Class: OpenSSL::X509::Certificate

Inherits:
Object
  • Object
show all
Defined in:
lib/ssl_utils.rb

Instance Method Summary collapse

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’.

Returns:

  • (Boolean)


10
11
12
# File 'lib/ssl_utils.rb', line 10

def top_level?
  serial == serial && issuer.to_s == subject.to_s
end