Class: CertificateAuthority::Extensions::AuthorityKeyIdentifier
- Inherits:
-
Object
- Object
- CertificateAuthority::Extensions::AuthorityKeyIdentifier
- Includes:
- ExtensionAPI
- Defined in:
- lib/certificate_authority/extensions.rb
Overview
Identifies the public key associated with a given private key. Reference: Section 4.2.1.1 of RFC3280 tools.ietf.org/html/rfc3280#section-4.2.1.1
Constant Summary collapse
- OPENSSL_IDENTIFIER =
"authorityKeyIdentifier"
Instance Attribute Summary collapse
-
#critical ⇒ Object
Returns the value of attribute critical.
-
#identifier ⇒ Object
Returns the value of attribute identifier.
Class Method Summary collapse
Instance Method Summary collapse
- #==(o) ⇒ Object
-
#initialize ⇒ AuthorityKeyIdentifier
constructor
A new instance of AuthorityKeyIdentifier.
- #openssl_identifier ⇒ Object
- #to_s ⇒ Object
Methods included from ExtensionAPI
Constructor Details
#initialize ⇒ AuthorityKeyIdentifier
Returns a new instance of AuthorityKeyIdentifier.
219 220 221 222 |
# File 'lib/certificate_authority/extensions.rb', line 219 def initialize @critical = false @identifier = ["keyid", "issuer"] end |
Instance Attribute Details
#critical ⇒ Object
Returns the value of attribute critical.
216 217 218 |
# File 'lib/certificate_authority/extensions.rb', line 216 def critical @critical end |
#identifier ⇒ Object
Returns the value of attribute identifier.
217 218 219 |
# File 'lib/certificate_authority/extensions.rb', line 217 def identifier @identifier end |
Class Method Details
.parse(value, critical) ⇒ Object
238 239 240 241 242 243 244 |
# File 'lib/certificate_authority/extensions.rb', line 238 def self.parse(value, critical) obj = self.new return obj if value.nil? obj.critical = critical obj.identifier = value.split(/,\s*/).last.chomp obj end |
Instance Method Details
#==(o) ⇒ Object
234 235 236 |
# File 'lib/certificate_authority/extensions.rb', line 234 def ==(o) o.class == self.class && o.state == state end |
#openssl_identifier ⇒ Object
224 225 226 |
# File 'lib/certificate_authority/extensions.rb', line 224 def openssl_identifier OPENSSL_IDENTIFIER end |
#to_s ⇒ Object
228 229 230 231 232 |
# File 'lib/certificate_authority/extensions.rb', line 228 def to_s res = [] res += @identifier res.join(',') end |