Ejemplo n.º 1
0
/*
 * NSS_CMSEncryptedData_Decode_AfterData - finish decrypting this encryptedData's content
 */
SECStatus
NSS_CMSEncryptedData_Decode_AfterData(NSSCMSEncryptedData *encd)
{
    if (encd->contentInfo.ciphcx) {
	NSS_CMSCipherContext_Destroy(encd->contentInfo.ciphcx);
	encd->contentInfo.ciphcx = NULL;
    }

    return SECSuccess;
}
Ejemplo n.º 2
0
/*
 * NSS_CMSEnvelopedData_Decode_AfterData - finish decrypting this envelopedData's content
 */
SECStatus
NSS_CMSEnvelopedData_Decode_AfterData(NSSCMSEnvelopedData *envd)
{
    if (envd && envd->contentInfo.privateInfo && envd->contentInfo.privateInfo->ciphcx) {
	NSS_CMSCipherContext_Destroy(envd->contentInfo.privateInfo->ciphcx);
	envd->contentInfo.privateInfo->ciphcx = NULL;
    }

    return SECSuccess;
}
Ejemplo n.º 3
0
/*
 * NSS_CMSEnvelopedData_Encode_AfterData - finalize this envelopedData for encoding
 */
SECStatus
NSS_CMSEnvelopedData_Encode_AfterData(NSSCMSEnvelopedData *envd)
{
    if (envd->contentInfo.privateInfo && envd->contentInfo.privateInfo->ciphcx) {
	NSS_CMSCipherContext_Destroy(envd->contentInfo.privateInfo->ciphcx);
	envd->contentInfo.privateInfo->ciphcx = NULL;
    }

    /* nothing else to do after data */
    return SECSuccess;
}
Ejemplo n.º 4
0
static void
nss_cmsContentInfo_private_destroy(NSSCMSContentInfoPrivate *privateInfo)
{
    if (privateInfo->digcx) {
        /* must destroy digest objects */
        NSS_CMSDigestContext_Cancel(privateInfo->digcx);
        privateInfo->digcx = NULL;
    }
    if (privateInfo->ciphcx) {
        NSS_CMSCipherContext_Destroy(privateInfo->ciphcx);
        privateInfo->ciphcx = NULL;
    }
    PORT_Free(privateInfo);
}