Class: OpenSSL::X509::Certificate
- Inherits:
-
Object
- Object
- OpenSSL::X509::Certificate
- Defined in:
- lib/arachni/rpc/em/ssl.rb
Overview
Adds support for a few helper methods to X509 certs.
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
18 19 20 |
# File 'lib/arachni/rpc/em/ssl.rb', line 18 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’.
24 25 26 |
# File 'lib/arachni/rpc/em/ssl.rb', line 24 def top_level? serial == serial && issuer.to_s == subject.to_s end |