X509Certificate#
SYNOPSIS#
Support for parsing X.509 certificates.
PUBLIC INTERFACE#
new()#
Don't use the constructor directly, use the ObjectManager instead:
my $X509CertificateObject = $Kernel::OM->Get('Kernel::System::X509Certificate');
IsSupported()#
Checks (and requires) Crypt::OpenSSL::X509 module needed for X.509 certificate support.
my $X509CertificateObjectIsSupported = $X509CertificateObject->IsSupported();
Returns true value if X.509 certificates are supported.
Parse()#
Parses the given certificate and returns a hash with its data.
my $X509Certificate = $X509CertificateObject->Parse(
# String or FilePath
String => '...',
FilePath => '/home/user1/cert.pem',
);
Returns:
my $X509Certificate = {
Email => '...',
IsExpired => 0,
Issuer => '...',
NotAfter => '...',
NotBefore => '...',
Serial => '...',
Subject => '...',
Version => '...',
CryptOpenSSLX509Object => $Object, # object returned by Crypt::OpenSSL::X509
};