Class: CertificateAuthority::Extensions::SubjectAlternativeName
- Inherits:
-
Object
- Object
- CertificateAuthority::Extensions::SubjectAlternativeName
- Includes:
- ExtensionAPI
- Defined in:
- lib/certificate_authority/extensions.rb
Instance Attribute Summary collapse
-
#dns_names ⇒ Object
Returns the value of attribute dns_names.
-
#ips ⇒ Object
Returns the value of attribute ips.
-
#uris ⇒ Object
Returns the value of attribute uris.
Instance Method Summary collapse
-
#initialize ⇒ SubjectAlternativeName
constructor
A new instance of SubjectAlternativeName.
- #openssl_identifier ⇒ Object
- #to_s ⇒ Object
Methods included from ExtensionAPI
Constructor Details
#initialize ⇒ SubjectAlternativeName
Returns a new instance of SubjectAlternativeName.
161 162 163 164 165 |
# File 'lib/certificate_authority/extensions.rb', line 161 def initialize self.uris = [] self.dns_names = [] self.ips = [] end |
Instance Attribute Details
#dns_names ⇒ Object
Returns the value of attribute dns_names.
159 160 161 |
# File 'lib/certificate_authority/extensions.rb', line 159 def dns_names @dns_names end |
#ips ⇒ Object
Returns the value of attribute ips.
159 160 161 |
# File 'lib/certificate_authority/extensions.rb', line 159 def ips @ips end |
#uris ⇒ Object
Returns the value of attribute uris.
159 160 161 |
# File 'lib/certificate_authority/extensions.rb', line 159 def uris @uris end |
Instance Method Details
#openssl_identifier ⇒ Object
182 183 184 |
# File 'lib/certificate_authority/extensions.rb', line 182 def openssl_identifier "subjectAltName" end |
#to_s ⇒ Object
186 187 188 189 190 191 192 |
# File 'lib/certificate_authority/extensions.rb', line 186 def to_s res = self.uris.map {|u| "URI:#{u}" } res += self.dns_names.map {|d| "DNS:#{d}" } res += self.ips.map {|i| "IP:#{i}" } return res.join(',') end |