module OpenSSLExtensions::SSL::SSLSocket

Public Class Methods

included(base) click to toggle source
# File lib/openssl-extensions/ssl/ssl_socket.rb, line 6
def self.included(base)
  base.send(:alias_method,
            :peer_cert_chain_without_openssl_extension,
            :peer_cert_chain)
  base.send(:alias_method,
            :peer_cert_chain,
            :peer_cert_chain_with_openssl_extension)
end

Public Instance Methods

peer_cert_chain_with_openssl_extension() click to toggle source

Rather than returning the default, unsorted Array of OpenSSL::X509::Certificate instances, this will filter that Array through the OpenSSLExtensions::X509::CertificateChain.

# File lib/openssl-extensions/ssl/ssl_socket.rb, line 20
def peer_cert_chain_with_openssl_extension
  OpenSSLExtensions::X509::CertificateChain.
    new(peer_cert, peer_cert_chain_without_openssl_extension)
end