sign(input_bio,
private_key,
cert,
keyring_source,
type)
| source code
|
Signs the input data with the private key and the certificate from
keyring source.
- Parameters:
input_bio (M2Crypto.BIO) - input data to sign.
private_key (filepath or M2Crypto.BIO or M2Crypto.EVP.PKey) - sender 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) - sender 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 signer settings. Ammitted values are:
file, memory, pkcs11.
type (str) - specifies the type of output PKCS#7 data: PEM or DER
- Returns: M2Crypto.SMIME.PKCS7
- the PKCS#7 signed data in PEM or DER format.
|