Class: EaSSL::CertificateAuthority
- Inherits:
-
Object
- Object
- EaSSL::CertificateAuthority
- Defined in:
- lib/eassl/certificate_authority.rb
Overview
- Author
-
Paul Nicholson ([email protected])
- Co-Author
-
Adam Williams ([email protected])
- Copyright
-
Copyright © 2006 WebPower Design
- License
-
Distributes under the same terms as Ruby
Instance Attribute Summary collapse
-
#certificate ⇒ Object
readonly
Returns the value of attribute certificate.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
- #create_certificate(signing_request) ⇒ Object
-
#initialize(options = {}) ⇒ CertificateAuthority
constructor
A new instance of CertificateAuthority.
Constructor Details
#initialize(options = {}) ⇒ CertificateAuthority
Returns a new instance of CertificateAuthority.
10 11 12 13 |
# File 'lib/eassl/certificate_authority.rb', line 10 def initialize( = {}) @key = Key.new({:password => 'ca_ssl_password'}.update()) @certificate = AuthorityCertificate.new(:key => @key) end |
Instance Attribute Details
#certificate ⇒ Object (readonly)
Returns the value of attribute certificate.
9 10 11 |
# File 'lib/eassl/certificate_authority.rb', line 9 def certificate @certificate end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
9 10 11 |
# File 'lib/eassl/certificate_authority.rb', line 9 def key @key end |
Instance Method Details
#create_certificate(signing_request) ⇒ Object
15 16 17 18 19 |
# File 'lib/eassl/certificate_authority.rb', line 15 def create_certificate(signing_request) cert = Certificate.new(:signing_request => signing_request, :ca_certificate => @certificate) cert.sign(@key) cert end |