Method: R509::Cert::Extensions::BasicConstraints#allows_sub_ca?

Defined in:
lib/r509/cert/extensions/basic_constraints.rb

#allows_sub_ca?Boolean

Returns true if the path length allows this certificate to be used to create subordinate signing certificates beneath it. Does not check if there is a pathlen restriction in the cert chain above the current cert

Returns:

  • (Boolean)


46
47
48
49
50
# File 'lib/r509/cert/extensions/basic_constraints.rb', line 46

def allows_sub_ca?
  return false unless is_ca?
  return true if @path_length.nil?
  @path_length > 0
end