Class: R509::Cert::Extensions::PolicyConstraints
- Inherits:
-
OpenSSL::X509::Extension
- Object
- OpenSSL::X509::Extension
- R509::Cert::Extensions::PolicyConstraints
- Defined in:
- lib/r509/cert/extensions.rb
Overview
Implements the PolicyConstraints 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
"policyConstraints"
Instance Attribute Summary (collapse)
-
- (Object) inhibit_policy_mapping
readonly
Returns the value of attribute inhibit_policy_mapping.
-
- (Object) require_explicit_policy
readonly
Returns the value of attribute require_explicit_policy.
Instance Method Summary (collapse)
-
- (PolicyConstraints) initialize(*args)
constructor
A new instance of PolicyConstraints.
Constructor Details
- (PolicyConstraints) initialize(*args)
A new instance of PolicyConstraints
559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 |
# File 'lib/r509/cert/extensions.rb', line 559 def initialize(*args) super(*args) # id-ce-policyConstraints OBJECT IDENTIFIER ::= { id-ce 36 } # PolicyConstraints ::= SEQUENCE { # requireExplicitPolicy [0] SkipCerts OPTIONAL, # inhibitPolicyMapping [1] SkipCerts OPTIONAL } # # SkipCerts ::= INTEGER (0..MAX) data = R509::ASN1.get_extension_payload(self) data.each do |pc| if pc.tag == 0 @require_explicit_policy = pc.value.bytes.to_a[0] elsif pc.tag == 1 @inhibit_policy_mapping = pc.value.bytes.to_a[0] end end end |
Instance Attribute Details
- (Object) inhibit_policy_mapping (readonly)
Returns the value of attribute inhibit_policy_mapping
557 558 559 |
# File 'lib/r509/cert/extensions.rb', line 557 def inhibit_policy_mapping @inhibit_policy_mapping end |
- (Object) require_explicit_policy (readonly)
Returns the value of attribute require_explicit_policy
556 557 558 |
# File 'lib/r509/cert/extensions.rb', line 556 def require_explicit_policy @require_explicit_policy end |