Class: Ronin::DB::CertSubjectAltName
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Ronin::DB::CertSubjectAltName
- Includes:
- Model
- Defined in:
- lib/ronin/db/cert_subject_alt_name.rb
Overview
Represents a subjectAltName
value from a SSL/TLS certificate.
Instance Attribute Summary collapse
-
#cert ⇒ Cert
The parent certificate.
-
#id ⇒ Integer
The primary key of the certificate
subjectAltName
value. -
#name ⇒ CertName
A
DNS:
,IP:
, orEmail:
name.
Class Method Summary collapse
-
.parse(string) ⇒ Array<String>
private
Parses a
subjectAltName
string.
Instance Method Summary collapse
-
#to_s ⇒ String
Converts the certificate
subjectAltName
to a String.
Methods included from Model
Instance Attribute Details
#cert ⇒ Cert
The parent certificate.
53 |
# File 'lib/ronin/db/cert_subject_alt_name.rb', line 53 belongs_to :cert, required: true |
#id ⇒ Integer
The primary key of the certificate subjectAltName
value.
40 |
# File 'lib/ronin/db/cert_subject_alt_name.rb', line 40 attribute :id, :integer |
#name ⇒ CertName
A DNS:
, IP:
, or Email:
name.
46 47 |
# File 'lib/ronin/db/cert_subject_alt_name.rb', line 46 belongs_to :name, class_name: 'CertName', required: true |
Class Method Details
.parse(string) ⇒ Array<String>
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.
Parses a subjectAltName
string.
66 67 68 69 70 71 72 |
# File 'lib/ronin/db/cert_subject_alt_name.rb', line 66 def self.parse(string) string.split(', ').map do |item| _prefix, name = item.split(':',2) name end end |
Instance Method Details
#to_s ⇒ String
Converts the certificate subjectAltName
to a String.
79 80 81 |
# File 'lib/ronin/db/cert_subject_alt_name.rb', line 79 def to_s name.to_s end |