Class: CertificateAuthority::Extensions::SubjectKeyIdentifier
- Inherits:
-
Object
- Object
- CertificateAuthority::Extensions::SubjectKeyIdentifier
- Includes:
- ExtensionAPI
- Defined in:
- lib/certificate_authority/extensions.rb
Overview
Identifies the public key associated with a given certificate. Should be required for “CA” certificates. Reference: Section 4.2.1.2 of RFC3280 tools.ietf.org/html/rfc3280#section-4.2.1.2
Constant Summary collapse
- OPENSSL_IDENTIFIER =
"subjectKeyIdentifier"
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 ⇒ SubjectKeyIdentifier
constructor
A new instance of SubjectKeyIdentifier.
- #openssl_identifier ⇒ Object
- #to_s ⇒ Object
Methods included from ExtensionAPI
Constructor Details
#initialize ⇒ SubjectKeyIdentifier
Returns a new instance of SubjectKeyIdentifier.
175 176 177 178 |
# File 'lib/certificate_authority/extensions.rb', line 175 def initialize @critical = false @identifier = "hash" end |
Instance Attribute Details
#critical ⇒ Object
Returns the value of attribute critical.
172 173 174 |
# File 'lib/certificate_authority/extensions.rb', line 172 def critical @critical end |
#identifier ⇒ Object
Returns the value of attribute identifier.
173 174 175 |
# File 'lib/certificate_authority/extensions.rb', line 173 def identifier @identifier end |
Class Method Details
.parse(value, critical) ⇒ Object
194 195 196 197 198 199 200 |
# File 'lib/certificate_authority/extensions.rb', line 194 def self.parse(value, critical) obj = self.new return obj if value.nil? obj.critical = critical obj.identifier = value obj end |
Instance Method Details
#==(o) ⇒ Object
190 191 192 |
# File 'lib/certificate_authority/extensions.rb', line 190 def ==(o) o.class == self.class && o.state == state end |
#openssl_identifier ⇒ Object
180 181 182 |
# File 'lib/certificate_authority/extensions.rb', line 180 def openssl_identifier OPENSSL_IDENTIFIER end |
#to_s ⇒ Object
184 185 186 187 188 |
# File 'lib/certificate_authority/extensions.rb', line 184 def to_s res = [] res << @identifier res.join(',') end |