Class: CertificateAuthority::Extensions::ExtendedKeyUsage
- Inherits:
-
Object
- Object
- CertificateAuthority::Extensions::ExtendedKeyUsage
- Includes:
- ExtensionAPI
- Defined in:
- lib/certificate_authority/extensions.rb
Overview
Specifies even more allowed usages in addition to what is specified in the Key Usage extension. Reference: Section 4.2.1.13 of RFC3280 tools.ietf.org/html/rfc3280#section-4.2.1.13
Constant Summary collapse
- OPENSSL_IDENTIFIER =
"extendedKeyUsage"
Instance Attribute Summary collapse
-
#critical ⇒ Object
Returns the value of attribute critical.
-
#usage ⇒ Object
Returns the value of attribute usage.
Class Method Summary collapse
Instance Method Summary collapse
- #==(o) ⇒ Object
-
#initialize ⇒ ExtendedKeyUsage
constructor
A new instance of ExtendedKeyUsage.
- #openssl_identifier ⇒ Object
- #to_s ⇒ Object
Methods included from ExtensionAPI
Constructor Details
#initialize ⇒ ExtendedKeyUsage
Returns a new instance of ExtendedKeyUsage.
369 370 371 372 |
# File 'lib/certificate_authority/extensions.rb', line 369 def initialize @critical = false @usage = ["serverAuth"] end |
Instance Attribute Details
#critical ⇒ Object
Returns the value of attribute critical.
366 367 368 |
# File 'lib/certificate_authority/extensions.rb', line 366 def critical @critical end |
#usage ⇒ Object
Returns the value of attribute usage.
367 368 369 |
# File 'lib/certificate_authority/extensions.rb', line 367 def usage @usage end |
Class Method Details
.parse(value, critical) ⇒ Object
388 389 390 391 392 393 394 |
# File 'lib/certificate_authority/extensions.rb', line 388 def self.parse(value, critical) obj = self.new return obj if value.nil? obj.critical = critical obj.usage = value.split(/,\s*/) obj end |
Instance Method Details
#==(o) ⇒ Object
384 385 386 |
# File 'lib/certificate_authority/extensions.rb', line 384 def ==(o) o.class == self.class && o.state == state end |
#openssl_identifier ⇒ Object
374 375 376 |
# File 'lib/certificate_authority/extensions.rb', line 374 def openssl_identifier OPENSSL_IDENTIFIER end |
#to_s ⇒ Object
378 379 380 381 382 |
# File 'lib/certificate_authority/extensions.rb', line 378 def to_s res = [] res += @usage res.join(',') end |