Class: OpenSSLExtensions::X509::CertificateChain
- Inherits:
-
Object
- Object
- OpenSSLExtensions::X509::CertificateChain
- Defined in:
- lib/openssl-extensions/x509/certificate_chain.rb
Overview
Provides a thin wrapper to an Array which contains the full certificate chain. This array, however, has been reorganized to be in the proper order for the chain as follows:
[Site Certificate, Intermediary #1, ..., CA Root]
Where Intermediary #1 is the issuing certificate of the Site Certificate, followed by #2
which issued #1
, down to the final root signing certificate in last position.
Instance Method Summary collapse
-
#initialize(peer_certificate, certificates) ⇒ CertificateChain
constructor
A new instance of CertificateChain.
Constructor Details
#initialize(peer_certificate, certificates) ⇒ CertificateChain
Returns a new instance of CertificateChain.
19 20 21 22 |
# File 'lib/openssl-extensions/x509/certificate_chain.rb', line 19 def initialize(peer_certificate, certificates) @certificates = [] reorganize!(peer_certificate, certificates) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object (private)
24 25 26 |
# File 'lib/openssl-extensions/x509/certificate_chain.rb', line 24 def method_missing(method, *args, &block) @certificates.send(method, *args, &block) end |