зеркало из https://github.com/mozilla/gecko-dev.git
Don't go searching for the matching certs if they weren't on the token the
private key lived on.
This commit is contained in:
Родитель
39c2b9d38b
Коммит
dfe3ee8685
|
@ -706,20 +706,9 @@ PK11_GetCertFromPrivateKey(SECKEYPrivateKey *privKey)
|
||||||
CERTCertificate *cert;
|
CERTCertificate *cert;
|
||||||
|
|
||||||
if (certID == CK_INVALID_HANDLE) {
|
if (certID == CK_INVALID_HANDLE) {
|
||||||
/* couldn't find it on the card, look in our data base */
|
|
||||||
SECItem derSubject;
|
|
||||||
|
|
||||||
rv = PK11_ReadAttribute(slot, handle, CKA_SUBJECT, NULL,
|
|
||||||
&derSubject);
|
|
||||||
if (rv != SECSuccess) {
|
|
||||||
PORT_SetError(SSL_ERROR_NO_CERTIFICATE);
|
PORT_SetError(SSL_ERROR_NO_CERTIFICATE);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
cert = CERT_FindCertByName(CERT_GetDefaultCertDB(),&derSubject);
|
|
||||||
PORT_Free(derSubject.data);
|
|
||||||
return cert;
|
|
||||||
}
|
|
||||||
cert = PK11_MakeCertFromHandle(slot,certID,NULL);
|
cert = PK11_MakeCertFromHandle(slot,certID,NULL);
|
||||||
return (cert);
|
return (cert);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче