mail_decrypt(encrypted_mail,
recipient_private_key,
recipient_cert,
keyring_source='file',
type='PEM')
| source code
|
Decrypts the input mail data with input private key and input
certificate.
- Parameters:
encrypted_mail (str) - encrypted mail body to decrypt.
recipient_private_key (filepath or M2Crypto.BIO or M2Crypto.EVP.PKey) - recipient private key reference, could be from file, from memory
or from pkcs11 smartcard, based on keyring_source input
parameter.
recipient_cert (filepath or M2Crypto.BIO or M2Crypto.X509.X509) - recipient certificate, could be from filepath, from memory or
from pkcs11 smartcard, based on keyring_source input parameter.
keyring_source (str) - the type of the source for input certificate, used to recall the
appropriate method for decrypter settings. Ammitted values are:
file, memory, pkcs11.
type (str) - specifies the type of input PKCS#7 data: PEM or DER
- Returns: str
- the decrypted data in plain form.
|