Class: R509::Cert::Extensions::CertificatePolicies
- Inherits:
-
OpenSSL::X509::Extension
- Object
- OpenSSL::X509::Extension
- R509::Cert::Extensions::CertificatePolicies
- Defined in:
- lib/r509/cert/extensions.rb
Overview
Implements the CertificatePolicies certificate extension, with methods to provide access to the components and meaning of the extension's contents.
Constant Summary
- OID =
friendly name for CP OID
"certificatePolicies"
Instance Attribute Summary (collapse)
-
- (Object) policies
readonly
Returns the value of attribute policies.
Instance Method Summary (collapse)
-
- (CertificatePolicies) initialize(*args)
constructor
A new instance of CertificatePolicies.
Constructor Details
- (CertificatePolicies) initialize(*args)
A new instance of CertificatePolicies
516 517 518 519 520 521 522 523 524 525 526 527 |
# File 'lib/r509/cert/extensions.rb', line 516 def initialize(*args) @policies = [] super(*args) data = R509::ASN1.get_extension_payload(self) # each element of this sequence should be part of a policy + qualifiers # certificatePolicies ::= SEQUENCE SIZE (1..MAX) OF PolicyInformation data.each do |cp| @policies << R509::ASN1::PolicyInformation.new(cp) end if data.respond_to?(:each) end |
Instance Attribute Details
- (Object) policies (readonly)
Returns the value of attribute policies
514 515 516 |
# File 'lib/r509/cert/extensions.rb', line 514 def policies @policies end |