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 |
# File 'lib/eassl/certificate_name.rb', line 9 def initialize() @options = end |
Instance Method Details
#name ⇒ Object
32 33 34 |
# File 'lib/eassl/certificate_name.rb', line 32 def name ssl end |
#options ⇒ Object
36 37 38 |
# File 'lib/eassl/certificate_name.rb', line 36 def @options end |
#ssl ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/eassl/certificate_name.rb', line 13 def ssl name_mapping = [ ['C', :country], ['ST', :state], ['L', :city], ['O', :organization], ['OU', :department], ['CN', :common_name], ['emailAddress', :email] ] name = [] name_mapping.each do |k| name << [k[0], @options[k[1]], OpenSSL::ASN1::PRINTABLESTRING] if @options[k[1]] end OpenSSL::X509::Name.new(name) end |