Method: Inspec::Resources::X509CertificateResource#subject
- Defined in:
- lib/resources/x509_certificate.rb
#subject ⇒ Object
80 81 82 83 84 85 86 |
# File 'lib/resources/x509_certificate.rb', line 80 def subject return if @cert.nil? # Return cached subject if we have already parsed it return @parsed_subject if @parsed_subject # Use a Mash to make it easier to access hash elements in "its('subject') {should ...}" @parsed_subject = Hashie::Mash.new(Hash[@cert.subject.to_a.map { |k, v, _| [k, v] }]) end |