зеркало из https://github.com/mozilla/gecko-dev.git
Bug 127886: added the new function PK11_ImportDERCert.
Modified files: nss/nss.def pk11wrap/pk11cert.c pk11wrap/pk11func.h
This commit is contained in:
Родитель
d982fc5cee
Коммит
ccb57e7a19
|
@ -700,6 +700,7 @@ CERT_VerifyOCSPResponseSignature;
|
|||
PK11_GetModInfo;
|
||||
PK11_GetPBEIV;
|
||||
PK11_ImportCRL;
|
||||
PK11_ImportDERCert;
|
||||
PK11_PubUnwrapSymKeyWithFlags;
|
||||
PK11_SaveContextAlloc;
|
||||
SEC_QuickDERDecodeItem;
|
||||
|
|
|
@ -1798,6 +1798,21 @@ loser:
|
|||
#endif
|
||||
}
|
||||
|
||||
SECStatus
|
||||
PK11_ImportDERCert(PK11SlotInfo *slot, SECItem *derCert,
|
||||
CK_OBJECT_HANDLE key, char *nickname, PRBool includeTrust) {
|
||||
CERTCertificate *cert;
|
||||
SECStatus rv;
|
||||
|
||||
cert = CERT_NewTempCertificate(CERT_GetDefaultCertDB(),
|
||||
derCert, NULL, PR_FALSE, PR_TRUE);
|
||||
if (cert == NULL) return SECFailure;
|
||||
|
||||
rv = PK11_ImportCert(slot, cert, key, nickname, includeTrust);
|
||||
CERT_DestroyCertificate (cert);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/*
|
||||
* get a certificate handle, look at the cached handle first..
|
||||
*/
|
||||
|
|
|
@ -388,6 +388,8 @@ CERTCertList * PK11_FindCertsFromNickname(char *nickname, void *wincx);
|
|||
SECKEYPrivateKey * PK11_FindPrivateKeyFromNickname(char *nickname, void *wincx);
|
||||
SECStatus PK11_ImportCert(PK11SlotInfo *slot, CERTCertificate *cert,
|
||||
CK_OBJECT_HANDLE key, char *nickname, PRBool includeTrust);
|
||||
SECStatus PK11_ImportDERCert(PK11SlotInfo *slot, SECItem *derCert,
|
||||
CK_OBJECT_HANDLE key, char *nickname, PRBool includeTrust);
|
||||
PK11SlotInfo *PK11_ImportCertForKey(CERTCertificate *cert, char *nickname,
|
||||
void *wincx);
|
||||
PK11SlotInfo *PK11_ImportDERCertForKey(SECItem *derCert, char *nickname,
|
||||
|
|
Загрузка…
Ссылка в новой задаче