Class: CertificateAuthority::Extensions::BasicContraints

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Validations, ExtensionAPI
Defined in:
lib/certificate_authority/extensions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ExtensionAPI

#config_extensions

Constructor Details

#initializeBasicContraints

Returns a new instance of BasicContraints.



24
25
26
# File 'lib/certificate_authority/extensions.rb', line 24

def initialize
  self.ca = false
end

Instance Attribute Details

#caObject

Returns the value of attribute ca.



20
21
22
# File 'lib/certificate_authority/extensions.rb', line 20

def ca
  @ca
end

#path_lenObject

Returns the value of attribute path_len.



21
22
23
# File 'lib/certificate_authority/extensions.rb', line 21

def path_len
  @path_len
end

Instance Method Details

#is_ca?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/certificate_authority/extensions.rb', line 28

def is_ca?
  self.ca
end

#openssl_identifierObject



37
38
39
# File 'lib/certificate_authority/extensions.rb', line 37

def openssl_identifier
  "basicConstraints"
end

#to_sObject



41
42
43
44
45
46
# File 'lib/certificate_authority/extensions.rb', line 41

def to_s
  result = ""
  result += "CA:#{self.ca}"
  result += ",pathlen:#{self.path_len}" unless self.path_len.nil?
  result
end