Class: R509::Cert::Extensions::InhibitAnyPolicy
- Inherits:
-
OpenSSL::X509::Extension
- Object
- OpenSSL::X509::Extension
- R509::Cert::Extensions::InhibitAnyPolicy
- Includes:
- ValidationMixin
- Defined in:
- lib/r509/cert/extensions/inhibit_any_policy.rb
Overview
The inhibit anyPolicy extension indicates that the special anyPolicy OID, with the value { 2 5 29 32 0 }, is not considered an explicit match for other certificate policies except when it appears in an intermediate self-issued CA certificate. The value indicates the number of additional non-self-issued certificates that may appear in the path before anyPolicy is no longer permitted. For example, a value of one indicates that anyPolicy may be processed in certificates issued by the subject of this certificate, but not in additional certificates in the path.
You can use this extension to parse an existing extension for easy access to the contents or create a new one.
Constant Summary
- OID =
friendly name for CP OID
"inhibitAnyPolicy"
Instance Attribute Summary collapse
- #value ⇒ Integer readonly
Instance Method Summary collapse
-
#initialize(arg) ⇒ InhibitAnyPolicy
constructor
This method takes a hash or an existing Extension object to parse.
- #to_h ⇒ Hash
- #to_yaml ⇒ YAML
Constructor Details
#initialize(arg) ⇒ InhibitAnyPolicy
This method takes a hash or an existing Extension object to parse
33 34 35 36 37 38 39 40 |
# File 'lib/r509/cert/extensions/inhibit_any_policy.rb', line 33 def initialize(arg) unless R509::Cert::Extensions.is_extension?(arg) arg = build_extension(arg) end super(arg) parse_extension end |
Instance Attribute Details
#value ⇒ Integer (readonly)
27 28 29 |
# File 'lib/r509/cert/extensions/inhibit_any_policy.rb', line 27 def value @value end |
Instance Method Details
#to_h ⇒ Hash
43 44 45 |
# File 'lib/r509/cert/extensions/inhibit_any_policy.rb', line 43 def to_h { :critical => self.critical?, :value => @value } end |
#to_yaml ⇒ YAML
48 49 50 |
# File 'lib/r509/cert/extensions/inhibit_any_policy.rb', line 48 def to_yaml self.to_h.to_yaml end |