зеркало из https://github.com/mozilla/pjs.git
Add DER version of key for cert exists for JSS.
This commit is contained in:
Родитель
0a4af35267
Коммит
ff6a136597
|
@ -1546,6 +1546,24 @@ PK11_KeyForCertExists(CERTCertificate *cert, CK_OBJECT_HANDLE *keyPtr,
|
|||
return slot;
|
||||
|
||||
}
|
||||
/*
|
||||
* import a cert for a private key we have already generated. Set the label
|
||||
* on both to be the nickname. This is for the Key Gen, orphaned key case.
|
||||
*/
|
||||
PK11SlotInfo *
|
||||
PK11_KeyForDERCertExists(SECItem *derCert, CK_OBJECT_HANDLE *keyPtr,
|
||||
void *wincx) {
|
||||
CERTCertificate *cert;
|
||||
PK11SlotInfo *slot = NULL;
|
||||
|
||||
cert = CERT_NewTempCertificate(CERT_GetDefaultCertDB(), derCert, NULL,
|
||||
PR_FALSE, PR_TRUE);
|
||||
if (cert == NULL) return NULL;
|
||||
|
||||
slot = PK11_KeyForCertExists(cert, keyPtr, wincx);
|
||||
CERT_DestroyCertificate (cert);
|
||||
return slot;
|
||||
}
|
||||
|
||||
PK11SlotInfo *
|
||||
PK11_ImportCertForKey(CERTCertificate *cert, char *nickname,void *wincx) {
|
||||
|
|
|
@ -350,6 +350,8 @@ CK_OBJECT_HANDLE * PK11_FindObjectsFromNickname(char *nickname,
|
|||
void *wincx);
|
||||
PK11SlotInfo *PK11_KeyForCertExists(CERTCertificate *cert,
|
||||
CK_OBJECT_HANDLE *keyPtr, void *wincx);
|
||||
PK11SlotInfo *PK11_KeyForDERCertExists(SECItem *derCert,
|
||||
CK_OBJECT_HANDLE *keyPtr, void *wincx);
|
||||
CK_OBJECT_HANDLE PK11_MatchItem(PK11SlotInfo *slot,CK_OBJECT_HANDLE peer,
|
||||
CK_OBJECT_CLASS o_class);
|
||||
CERTCertificate * PK11_FindCertByIssuerAndSN(PK11SlotInfo **slot,
|
||||
|
|
Загрузка…
Ссылка в новой задаче