Class: EaSSL::CertificateName
- Inherits:
-
Object
- Object
- EaSSL::CertificateName
- Defined in:
- lib/eassl/certificate_name.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 Method Summary collapse
-
#initialize(options) ⇒ CertificateName
constructor
A new instance of CertificateName.
- #name ⇒ Object
- #options ⇒ Object
- #ssl ⇒ Object
Constructor Details
#initialize(options) ⇒ CertificateName
Returns a new instance of CertificateName.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/eassl/certificate_name.rb', line 9 def initialize() = { :country => "US", :state => "North Carolina", :city => "Fuquay Varina", :organization => "WebPower Design", :department => "Web Security", :common_name => nil, # required :email => "[email protected]", }.update() end |
Instance Method Details
#name ⇒ Object
33 34 35 |
# File 'lib/eassl/certificate_name.rb', line 33 def name ssl end |
#options ⇒ Object
37 38 39 |
# File 'lib/eassl/certificate_name.rb', line 37 def end |
#ssl ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/eassl/certificate_name.rb', line 21 def ssl OpenSSL::X509::Name.new([ ['C', [:country], OpenSSL::ASN1::PRINTABLESTRING], ['ST', [:state], OpenSSL::ASN1::PRINTABLESTRING], ['L', [:city], OpenSSL::ASN1::PRINTABLESTRING], ['O', [:organization], OpenSSL::ASN1::UTF8STRING], ['OU', [:department], OpenSSL::ASN1::UTF8STRING], ['CN', [:common_name], OpenSSL::ASN1::UTF8STRING], ['emailAddress', [:email], OpenSSL::ASN1::UTF8STRING] ]) end |