class GlobalSign::CsrDecoder::Response

Public Instance Methods

params() click to toggle source
# File lib/global_sign/csr_decoder/response.rb, line 13
def params
  @params ||= {
    csr_data:            detail(@xml.xpath(XPath::CSRData)),
    certificate_preview: detail(@xml.xpath(XPath::CertificatePreview))
  }
end
response_header() click to toggle source
# File lib/global_sign/csr_decoder/response.rb, line 9
def response_header
  :QueryResponseHeader
end

Private Instance Methods

detail(data) click to toggle source
# File lib/global_sign/csr_decoder/response.rb, line 22
def detail(data)
  {
    common_name:       data.at('CommonName').try(:text)   || '',
    organization:      data.at('Organization').try(:text) || '',
    organization_unit: data.at('Organization').try(:text) || '',
    locality:          data.at('Locality').try(:text)     || '',
    state:             data.at('State').try(:text)        || '',
    country:           data.at('Country').try(:text)      || '',
    email_address:     data.at('EmailAddress').try(:text) || '',
    key_length:        data.at('KeyLength').try(:text)    || ''
  }
end