Class: Sigstore::Internal::X509::Extension::BasicConstraints

Inherits:
Sigstore::Internal::X509::Extension show all
Defined in:
lib/sigstore/internal/x509.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Sigstore::Internal::X509::Extension

#critical?, #initialize, #shift_bitstring, #shift_value

Constructor Details

This class inherits a constructor from Sigstore::Internal::X509::Extension

Instance Attribute Details

#caObject (readonly)

Returns the value of attribute ca.



260
261
262
# File 'lib/sigstore/internal/x509.rb', line 260

def ca
  @ca
end

#path_len_constraintObject (readonly)

Returns the value of attribute path_len_constraint.



260
261
262
# File 'lib/sigstore/internal/x509.rb', line 260

def path_len_constraint
  @path_len_constraint
end

Instance Method Details

#parse_value(value) ⇒ Object



262
263
264
265
266
267
268
269
270
271
272
273
# File 'lib/sigstore/internal/x509.rb', line 262

def parse_value(value)
  value = shift_value([value], OpenSSL::ASN1::Sequence)

  @ca = false
  @path_len_constraint = nil

  @ca = shift_value(value, OpenSSL::ASN1::Boolean) if value.first.is_a?(OpenSSL::ASN1::Boolean)

  return unless value.first.is_a?(OpenSSL::ASN1::Integer)

  @path_len_constraint = shift_value(value, OpenSSL::ASN1::Integer)
end