Class: CertificateAuthority::Extensions::KeyUsage

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ExtensionAPI

#config_extensions

Constructor Details

#initializeKeyUsage

Returns a new instance of KeyUsage.



125
126
127
# File 'lib/certificate_authority/extensions.rb', line 125

def initialize
  self.usage = ["digitalSignature", "nonRepudiation"]
end

Instance Attribute Details

#usageObject

Returns the value of attribute usage.



123
124
125
# File 'lib/certificate_authority/extensions.rb', line 123

def usage
  @usage
end

Instance Method Details

#openssl_identifierObject



129
130
131
# File 'lib/certificate_authority/extensions.rb', line 129

def openssl_identifier
  "keyUsage"
end

#to_sObject



133
134
135
# File 'lib/certificate_authority/extensions.rb', line 133

def to_s
  "#{self.usage.join(',')}"
end