Name
SPVM::Net::SSLeay::PKCS12 - PKCS12 Data Structure in OpenSSL
Description
Net::SSLeay::PKCS12 class in SPVM represents PKCS12 data structure in OpenSSL.
Usage
use Net::SSLeay::PKCS12;
Class Methods
new
static method new : Net::SSLeay::PKCS12 ();
Calls native PKCS12_new function, creates a new Net::SSLeay::PKCS12 object, sets the pointer value of the object to the return value of the native function, and returns the new object.
Exceptions:
If PKCS12_new failed, an exception is thrown with eval_error_id
set to the basic type ID of Net::SSLeay::Error class.
Instance Methods
parse
method parse : int ($pass : string, $pkey_ref : Net::SSLeay::EVP_PKEY[], $cert_ref : Net::SSLeay::X509[], $cas_ref : Net::SSLeay::X509[][] = undef);
Calls native PKCS12_parse function given $pass, apprepriate arguments for rest arguments.
And creates a new Net::SSLeay::EVP_PKEY, sets the pointer value of the new object to the value of the corresponding output argument of the native function, sets $pkey_ref-
[0]> to the new object.
And creates a new Net::SSLeay::X509[], sets the pointer value of the new object to the value of the output corresponding argument of the native function, sets $cert_ref-
[0]> to the new object.
And creates a new array of Net::SSLeay::X509 from the value of the output corresponding argument of the native function, sets $cas_ref-
[0]> to the new array.
And returns the return value of the native function.
Exceptions:
The 1-length array $pkey_ref for output for a private key must be defined. Otherwise an exception is thrown.
The 1-length array $cert_ref for output for a certificate must be defined. Otherwise an exception is thrown.
The 1-length array $cas_ref for output for intermediate certificate must be defined if defined. Otherwise an exception is thrown.
If PKCS12_parse failed, an exception is thrown with eval_error_id
set to the basic type ID of Net::SSLeay::Error class.
DESTROY
method DESTROY : void ();
Calls native PKCS12_free function given the pointer value of the instance if no_free
flag of the instance is not a true value.
See Also
Copyright & License
Copyright (c) 2024 Yuki Kimoto
MIT License