Class: Ccrypto::X509::CSRProfile

Inherits:
Object
  • Object
show all
Includes:
AlgoConfig, TR::CondUtils, TeLogger::TeLogHelper
Defined in:
lib/ccrypto/configs/x509_csr_profile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from AlgoConfig

include

Constructor Details

#initializeCSRProfile

Returns a new instance of CSRProfile.



18
19
20
# File 'lib/ccrypto/configs/x509_csr_profile.rb', line 18

def initialize
  @hashAlgo = :sha256
end

Instance Attribute Details

#dns_nameObject

Returns the value of attribute dns_name.



14
15
16
# File 'lib/ccrypto/configs/x509_csr_profile.rb', line 14

def dns_name
  @dns_name
end

#emailObject

Returns the value of attribute email.



14
15
16
# File 'lib/ccrypto/configs/x509_csr_profile.rb', line 14

def email
  @email
end

#hashAlgoObject

Returns the value of attribute hashAlgo.



16
17
18
# File 'lib/ccrypto/configs/x509_csr_profile.rb', line 16

def hashAlgo
  @hashAlgo
end

#ip_addrObject

Returns the value of attribute ip_addr.



14
15
16
# File 'lib/ccrypto/configs/x509_csr_profile.rb', line 14

def ip_addr
  @ip_addr
end

#orgObject

Returns the value of attribute org.



13
14
15
# File 'lib/ccrypto/configs/x509_csr_profile.rb', line 13

def org
  @org
end

#org_unitObject

Returns the value of attribute org_unit.



14
15
16
# File 'lib/ccrypto/configs/x509_csr_profile.rb', line 14

def org_unit
  @org_unit
end

#owner_nameObject

Returns the value of attribute owner_name.



13
14
15
# File 'lib/ccrypto/configs/x509_csr_profile.rb', line 13

def owner_name
  @owner_name
end

#public_keyObject

Returns the value of attribute public_key.



15
16
17
# File 'lib/ccrypto/configs/x509_csr_profile.rb', line 15

def public_key
  @public_key
end

#uriObject

Returns the value of attribute uri.



14
15
16
# File 'lib/ccrypto/configs/x509_csr_profile.rb', line 14

def uri
  @uri
end

Instance Method Details

#add_custom_attribute(key, value, type = :string) ⇒ Object



123
124
125
# File 'lib/ccrypto/configs/x509_csr_profile.rb', line 123

def add_custom_attribute(key,value, type = :string)
  additional_attributes[key] = { value: value, type: type }
end

#add_custom_extension(oid, value, type = :string, critical = false) ⇒ Object



134
135
136
# File 'lib/ccrypto/configs/x509_csr_profile.rb', line 134

def add_custom_extension(oid, value, type = :string, critical = false)
  custom_extension[oid] = { type: type, value: value, critical: critical }
end

#additional_attributesObject



127
128
129
130
131
132
# File 'lib/ccrypto/configs/x509_csr_profile.rb', line 127

def additional_attributes
  if @addAttr.nil?
    @addAttr = {}
  end
  @addAttr
end

#custom_extensionObject



138
139
140
141
142
143
# File 'lib/ccrypto/configs/x509_csr_profile.rb', line 138

def custom_extension
  if @custom_extension.nil?
    @custom_extension = {  }
  end
  @custom_extension
end