PYTHON openssl_pkcs12_read

is this article helpful?
|
Python replacement for PHP's openssl_pkcs12_read [ edit | history ]
load_pkcs12(...)
Load a PKCS12 object from a buffer

@param buffer: The buffer the certificate is stored in
passphrase (Optional) - The password to decrypt the PKCS12 lump
@returns: The PKCS12 object


easy_install pyOpenSSL

from OpenSSL.crypto import load_pkcs12
p12 = load_pkcs12(open("/path/to/cert.p12", 'rb').read(), passwd)

PHP openssl_pkcs12_read

PHP original manual for openssl_pkcs12_read [ show | php.net ]

openssl_pkcs12_read

(PHP 5 >= 5.2.2)

openssl_pkcs12_readParse a PKCS#12 Certificate Store into an array

Description

bool openssl_pkcs12_read ( string $pkcs12 , array &$certs , string $pass )

openssl_pkcs12_read() parses the PKCS#12 certificate store supplied by pkcs12 into a array named certs .

Parameters

pkcs12

certs

On success, this will hold the Certificate Store Data.

pass

Encryption password for unlocking the PKCS#12 file.

Return Values

Returns TRUE on success or FALSE on failure.