class TCCE::Certificate
Attributes
json[RW]
Public Class Methods
parse(content)
click to toggle source
def to_s
JSON.pretty_generate json
end
# File lib/tcce/certificate.rb, line 12 def self.parse(content) file = TCCE::Certificate.new file.json = content file end
Public Instance Methods
certificate()
click to toggle source
# File lib/tcce/certificate.rb, line 26 def certificate certificate = Base64.decode64 json['Certificate']['Certificate'] OpenSSL::X509::Certificate.new certificate end
domain()
click to toggle source
# File lib/tcce/certificate.rb, line 18 def domain json['Domains']['Main'] end
private_key()
click to toggle source
# File lib/tcce/certificate.rb, line 31 def private_key private_key = Base64.decode64 json['Certificate']['PrivateKey'] OpenSSL::PKey::RSA.new private_key end
sans()
click to toggle source
# File lib/tcce/certificate.rb, line 22 def sans json['Domains']['SANs'] end