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:
relyea%netscape.com 2002-03-01 02:15:00 +00:00
Родитель 39c2b9d38b
Коммит dfe3ee8685
1 изменённых файлов: 2 добавлений и 13 удалений

Просмотреть файл

@ -706,19 +706,8 @@ PK11_GetCertFromPrivateKey(SECKEYPrivateKey *privKey)
CERTCertificate *cert;
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);
return NULL;
}
cert = CERT_FindCertByName(CERT_GetDefaultCertDB(),&derSubject);
PORT_Free(derSubject.data);
return cert;
PORT_SetError(SSL_ERROR_NO_CERTIFICATE);
return NULL;
}
cert = PK11_MakeCertFromHandle(slot,certID,NULL);
return (cert);