Class: EzCrypto::Certificate

Class | EzCrypto::Certificate
In: | lib/ezsig.rb
Parent: | Verifier

Certificate provides functionality to make it easy to extract information from a Certificate. This also provides all the same functionality as a Verifier.

### Methods

cert cert? cert_digest extensions issuer method_missing new not_after not_before register_with_pkyp serial subject valid?

### Public Class methods

new(cert)

Intialize with a OpenSSL cert object.

### Public Instance methods

cert()

Returns the OpenSSL Certificate object

cert?()

Returns true

cert_digest()

Returns the SHA1 hex digest of a the DER encoded certificate. This is useful as a unique identifier.

extensions()

Returns the hash of extensions available in the certificate. These are not always present.

issuer()

Returns a Name object containt the issuer of the certificate.

method_missing(method)

Any methods defined in Name can be used here. This means you can do cert.email rather than cert.subject.email.

not_after()

Returns the certificates valid not after date.

not_before()

Returns the certificates valid not before date.

register_with_pkyp()

Register the certificate at PKYP

serial()

Returns the issuers serial number for this certificate

subject()

Returns a Name object containt the subject of the certificate. The subject in X509 speak is the details of the certificate owner.

valid?(time=Time.now.utc)

Is this certificate valid at this point in time. Note this only checks if it is valid with respect to time. It is important to realize that it does not check with any CRL or OCSP services to see if the certificate was revoked.

[Validate]