PKCS12(3pm) | User Contributed Perl Documentation | PKCS12(3pm) |
Crypt::OpenSSL::PKCS12 - Perl extension to OpenSSL's PKCS12 API.
use Crypt::OpenSSL::PKCS12; my $pass = "your password"; my $pkcs12 = Crypt::OpenSSL::PKCS12->new_from_file('cert.p12'); print $pkcs12->certificate($pass); print $pkcs12->private_key($pass); if ($pkcs12->mac_ok($pass)) { ... # Creating a file $pkcs12->create('test-cert.pem', 'test-key.pem', $pass, 'out.p12', 'friendly name'); # Creating a string my $pksc12_data = $pkcs12->create_as_string('test-cert.pem', 'test-key.pem', $pass, 'friendly name');
This documentation describes version 1.9
PKCS12 is a file format for storing cryptography objects as a single file or string. PKCS12 is commonly used to bundle a private key with its X.509 certificate or to bundle all the members of a chain of trust.
This distribution implements a subset of OpenSSL's PKCS12 API.
Create a new Crypt::OpenSSL::PKCS12 instance.
Get the Base64 representation of the certificate.
Get the Base64 representation of the private key.
Get the binary represenation as a string.
Verifiy the certificates Message Authentication Code
Change a certificate's password.
Create a new PKCS12 certificate. $cert & $key may either be strings or filenames.
$friendly_name is optional.
Create a new PKCS12 certificate string. $cert & $key may either be strings or filenames.
$friendly_name is optional.
Returns a string holding the PKCS12 certicate.
None by default.
On request:
No diagnostics are documented at this time
No special environment or configuration is required.
This distribution has the following dependencies
Currently the library only supports OpenSSL 1.X.X
The library has not been tested with OpenSSL 3.X.X and is not expected to work with this version at this time
Please see the GitHub repository <https://github.com/dsully/perl-crypt-openssl-pkcs12/issues> for known issues.
Current maintainer
In alphabetical order, contributors, bug reporters and all
Copyright 2004-2021 by Dan Sully
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
2024-04-01 | perl v5.38.2 |