Class: Ronin::DB::CertIssuer

Inherits:
CertOrganization show all
Defined in:
lib/ronin/db/cert_issuer.rb

Overview

Represents the issuer of a SSL/TLS certificate.

Since:

  • 0.2.0

Constant Summary

Constants inherited from CertOrganization

Ronin::DB::CertOrganization::X509_ATTRIBUTES

Instance Attribute Summary collapse

Attributes inherited from CertOrganization

#country, #created_at, #id, #locality, #organization, #organizational_unit, #state

Class Method Summary collapse

Methods inherited from CertOrganization

parse

Methods included from Model

included

Instance Attribute Details

#certsArray<Cert>

The certificates that share this issuer information.

Returns:



56
57
# File 'lib/ronin/db/cert_issuer.rb', line 56

has_many :certs, foreign_key: :issuer_id,
dependent:   :destroy

#common_nameString?

Note:

Some Equifax certs do not set the issuer's common name (CN), so #common_name may sometimes return nil.

The issuer's common name (CN).

Returns:

  • (String, nil)


40
# File 'lib/ronin/db/cert_issuer.rb', line 40

attribute :common_name, :string

Class Method Details

.import(name) ⇒ CertIssuer

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Imports the certificate issuer's X509 distinguished name.

Parameters:

  • name (OpenSSL::X509::Name, String)

    The X509 name to parse and import.

Returns:

  • (CertIssuer)

    The imported or pre-existing certificate issuer.

Since:

  • 0.2.0



70
71
72
# File 'lib/ronin/db/cert_issuer.rb', line 70

def self.import(name)
  find_or_create_by(parse(name))
end