Class: SSLyze::X509::Extensions::BasicConstraints
- Inherits:
-
SSLyze::X509::Extension
- Object
- SimpleDelegator
- SSLyze::X509::Extension
- SSLyze::X509::Extensions::BasicConstraints
- Defined in:
- lib/sslyze/x509/extensions/basic_constraints.rb
Overview
Represents the basicConstraints
X509v3 extension.
Instance Method Summary collapse
-
#ca? ⇒ Boolean?
The value of the
CA
constraint. -
#path_length ⇒ Integer?
(also: #path_len, #pathlen)
The value of the
pathlen
constraint.
Instance Method Details
#ca? ⇒ Boolean?
The value of the CA
constraint.
18 19 20 21 22 |
# File 'lib/sslyze/x509/extensions/basic_constraints.rb', line 18 def ca? if value.include?('CA:TRUE') then true elsif value.include?('CA:FALSE') then false end end |
#path_length ⇒ Integer? Also known as: path_len, pathlen
The value of the pathlen
constraint.
29 30 31 32 33 |
# File 'lib/sslyze/x509/extensions/basic_constraints.rb', line 29 def path_length @path_length ||= if (match = value.match(/pathlen:(\d+)/)) match[1].to_i end end |