Class: R509::Cert::Extensions::CRLDistributionPoints
- Inherits:
-
OpenSSL::X509::Extension
- Object
- OpenSSL::X509::Extension
- R509::Cert::Extensions::CRLDistributionPoints
- Defined in:
- lib/r509/cert/extensions.rb
Overview
Implements the CRLDistributionPoints certificate extension, with methods to provide access to the components and meaning of the extension's contents.
Constant Summary
- OID =
friendly name for CDP OID
"crlDistributionPoints"
Instance Attribute Summary (collapse)
-
- (Object) crl
readonly
An array of the CRL URIs, if any.
Instance Method Summary (collapse)
-
- (CRLDistributionPoints) initialize(*args)
constructor
See OpenSSL::X509::Extension#initialize.
Constructor Details
- (CRLDistributionPoints) initialize(*args)
See OpenSSL::X509::Extension#initialize
474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 |
# File 'lib/r509/cert/extensions.rb', line 474 def initialize(*args) super(*args) @crl= R509::ASN1::GeneralNames.new data = R509::ASN1.get_extension_payload(self) data.entries.each do |distribution_point| # DistributionPoint ::= SEQUENCE { # distributionPoint [0] DistributionPointName OPTIONAL, # reasons [1] ReasonFlags OPTIONAL, # cRLIssuer [2] GeneralNames OPTIONAL } # DistributionPointName ::= CHOICE { # fullName [0] GeneralNames, # nameRelativeToCRLIssuer [1] RelativeDistinguishedName } # We're only going to handle DistributionPointName [0] for now # so grab entries[0] and then get the fullName with value[0] # and the value of that ASN1Data with value[0] again @crl.add_item(distribution_point.entries[0].value[0].value[0]) end end |
Instance Attribute Details
- (Object) crl (readonly)
An array of the CRL URIs, if any
471 472 473 |
# File 'lib/r509/cert/extensions.rb', line 471 def crl @crl end |