class SSLyze::X509::Extensions::BasicConstraints
Represents the `basicConstraints` X509v3 extension.
@since 1.0.0
Public Instance Methods
ca?()
click to toggle source
The value of the `CA` constraint.
@return [Boolean, nil]
# 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()
click to toggle source
The value of the `pathlen` constraint.
@return [Integer, nil]
# 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