NAME
App::CamelPKI::Certificate - Model for a X509 certificate in Camel-PKI.
SYNOPSIS
use App::CamelPKI::Certificate;
my $cert = parse App::CamelPKI::Certificate($pemstring, -format => "PEM");
print $cert->get_serial;
my $derstring = $cert->serialize(-format => "DER");
DESCRIPTION
This class is a Crypt::X509 and Convert::ASN1 wrapper; Its compensate these two packages deficiencies and provide a complete abstraction for X509 certificates, no matter they were issued by Camel-PKI or not.
Each instance of this classe represents a certificate. Instances are immutable.
METHODS
parse($texte, %options)
load($file, %options)
serialize(%options)
These methods are inherited from App::CamelPKI::PEM.
parse_bundle($texte)
Load $texte, which is a certificate bundle, ie a concatenation of one or more certificates in PEM format. Returns a list of App::CamelPKI::Certificate objects.
as_crypt_openssl_ca_x509()
Returns an intance of "Crypt::OpenSSL::CA::X509" in Crypt::OpenSSL::CA which modelize the certificate. This instance is newly created for each call, so that App::CamelPKI::Certificate do not have a shared mutable state.
get_serial
get_issuer_DN
get_subject_DN
get_subject_keyid
get_notBefore
get_notAfter
Delegated to methods of the same name in "Crypt::OpenSSL::CA::X509" in Crypt::OpenSSL::CA.
get_subject_CN
Returns the CN of the DN of the certificate suject.
get_public_key
Returns an object of the App::CamelPKI::PublicKey class.
equals($cert)
Returns true only if $cert, another object of the same App::CamelPKI::Certificate classe, modelise the same certificate.