set_keyring(smime,
private_key,
cert,
keyring_source)
| source code
|
Sets private key and certificate for input smime object based on
keyring source.
- Parameters:
smime (M2Crypto.SMIME) - the smime object to update with key and certificate data
private_key (filepath or M2Crypto.BIO or M2Crypto.EVP.PKey) - private key reference, could be from file, from memory or from
pkcs11 smartcard, based on keyring_soruce input parameter
cert (filepath or M2Crypto.BIO or M2Crypto.X509.X509) - certificate, could be from filepath, from memory or from pkcs11
smartcard, based on keyring_soruce input parameter
keyring_source (str) - the type of the source for input certificate, used to recall the
appropriate method for SMIME settings. Ammitted values are: file,
memory, pkcs11.
- Returns: boolean
- True if a valid keyring source, else False
- Raises:
BadKeyringSource - the selected Keyring source is not valid. Ammitted values are file,
memory and pkcs11.
|