Class: OpenSSL::X509::Certificate
- Inherits:
-
Object
- Object
- OpenSSL::X509::Certificate
- Defined in:
- lib/ssl_utils.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#top_level? ⇒ Boolean
(also: #root?, #self_signed?)
A serial must be unique for each certificate.
Instance Method Details
#==(other) ⇒ Object
4 5 6 |
# File 'lib/ssl_utils.rb', line 4 def ==(other) other.respond_to?(:to_pem) && to_pem == other.to_pem end |
#top_level? ⇒ Boolean Also known as: root?, self_signed?
A serial must be unique for each certificate. Self-signed certificates, and thus root CA certificates, have the same ‘issuer’ as ‘subject’.
10 11 12 |
# File 'lib/ssl_utils.rb', line 10 def top_level? serial == serial && issuer.to_s == subject.to_s end |