зеркало из https://github.com/mozilla/gecko-dev.git
Fix for 192590 - add ability to encode NSSCMSRecipientInfo . r=javi, wtc
This commit is contained in:
Родитель
a05452d1c8
Коммит
52ed6170ab
|
@ -34,7 +34,7 @@
|
|||
/*
|
||||
* Interfaces of the CMS implementation.
|
||||
*
|
||||
* $Id: cms.h,v 1.16 2003/02/28 23:32:29 relyea%netscape.com Exp $
|
||||
* $Id: cms.h,v 1.17 2003/03/11 03:38:53 jpierre%netscape.com Exp $
|
||||
*/
|
||||
|
||||
#ifndef _CMS_H_
|
||||
|
@ -903,6 +903,12 @@ NSS_CMSRecipientInfo_GetVersion(NSSCMSRecipientInfo *ri);
|
|||
extern SECItem *
|
||||
NSS_CMSRecipientInfo_GetEncryptedKey(NSSCMSRecipientInfo *ri, int subIndex);
|
||||
|
||||
/*
|
||||
* NSS_CMSRecipientInfo_Encode - encode an NSS_CMSRecipientInfo as ASN.1
|
||||
*/
|
||||
SECStatus NSS_CMSRecipientInfo_Encode(PRArenaPool* poolp,
|
||||
const NSSCMSRecipientInfo *src,
|
||||
SECItem* returned);
|
||||
|
||||
extern SECOidTag
|
||||
NSS_CMSRecipientInfo_GetKeyEncryptionAlgorithmTag(NSSCMSRecipientInfo *ri);
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
/*
|
||||
* CMS recipientInfo methods.
|
||||
*
|
||||
* $Id: cmsrecinfo.c,v 1.12 2003/03/03 19:46:22 relyea%netscape.com Exp $
|
||||
* $Id: cmsrecinfo.c,v 1.13 2003/03/11 03:38:54 jpierre%netscape.com Exp $
|
||||
*/
|
||||
|
||||
#include "cmslocal.h"
|
||||
|
@ -716,3 +716,18 @@ SECStatus NSS_CMSRecipientInfo_GetCertAndKey(NSSCMSRecipientInfo *ri,
|
|||
|
||||
return rv;
|
||||
}
|
||||
|
||||
SECStatus NSS_CMSRecipientInfo_Encode(PRArenaPool* poolp,
|
||||
const NSSCMSRecipientInfo *src,
|
||||
SECItem* returned)
|
||||
{
|
||||
extern const SEC_ASN1Template NSSCMSRecipientInfoTemplate[];
|
||||
SECStatus rv = SECFailure;
|
||||
if (!src || !returned) {
|
||||
PORT_SetError(SEC_ERROR_INVALID_ARGS);
|
||||
} else if (SEC_ASN1EncodeItem(poolp, returned, src,
|
||||
NSSCMSRecipientInfoTemplate)) {
|
||||
rv = SECSuccess;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
|
|
@ -234,6 +234,7 @@ NSS_CMSRecipientInfo_UnwrapBulkKey;
|
|||
;+ global:
|
||||
NSS_CMSRecipientInfo_CreateNew;
|
||||
NSS_CMSRecipientInfo_CreateFromDER;
|
||||
NSS_CMSRecipientInfo_Encode;
|
||||
NSS_CMSRecipientInfo_GetCertAndKey;
|
||||
;+ local:
|
||||
;+ *;
|
||||
|
|
Загрузка…
Ссылка в новой задаче