CFXXL v0.3.0 CFXXL.CertUtils View Source

A module containing utility functions to extract informations from PEM certificates

Link to this section Summary

Functions

Extracts the authority key identifier of a certificate

Extracts the Common Name of a certificate

Extracts the not_after field (expiration) of a certificate

Extracts the not_before field of a certificate

Extracts the serial number of a certificate

Link to this section Functions

Link to this function authority_key_identifier!(cert) View Source

Extracts the authority key identifier of a certificate.

cert must be a string containing a PEM encoded certificate.

Returns the authority key identifier as string or raises if it doesn’t find one or there’s an error.

Extracts the Common Name of a certificate.

cert must be a string containing a PEM encoded certificate.

Returns the Common Name as string or nil if it doesn’t find one, raises if there’s an error.

Extracts the not_after field (expiration) of a certificate.

cert must be a string containing a PEM encoded certificate.

Returns not_after as DateTime or raises if there’s an error.

Extracts the not_before field of a certificate.

cert must be a string containing a PEM encoded certificate.

Returns not_before as DateTime or raises if there’s an error.

Extracts the serial number of a certificate.

cert must be a string containing a PEM encoded certificate.

Returns the serial number as string or raises if there’s an error.