Bug 54104 - fix to find the built in CA certs

git-svn-id: svn://10.0.0.236/branches/NSS_3_3_BRANCH@100505 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ddrinan%netscape.com
2001-08-07 18:56:13 +00:00
parent cdefc7b916
commit 916b1e3f5e

View File

@@ -35,7 +35,7 @@
* Implementation of OCSP services, for both client and server.
* (XXX, really, mostly just for client right now, but intended to do both.)
*
* $Id: ocsp.c,v 1.1 2000-03-31 19:43:00 relyea%netscape.com Exp $
* $Id: ocsp.c,v 1.1.86.1 2001-08-07 18:54:57 ddrinan%netscape.com Exp $
*/
#include "prerror.h"
@@ -3704,6 +3704,12 @@ CERT_SetOCSPDefaultResponder(CERTCertDBHandle *handle,
* used const to convey that it does not modify the name. Maybe someday.
*/
cert = CERT_FindCertByNickname(handle, (char *) name);
if (cert == NULL) {
/*
* look for the cert on an external token.
*/
cert = PK11_FindCertFromNickname(name, NULL);
}
if (cert == NULL)
return SECFailure;
@@ -3831,6 +3837,10 @@ CERT_EnableOCSPDefaultResponder(CERTCertDBHandle *handle)
*/
cert = CERT_FindCertByNickname(handle,
statusContext->defaultResponderNickname);
if (cert == NULL) {
cert = PK11_FindCertFromNickname(statusContext->defaultResponderNickname,
NULL);
}
/*
* We should never have trouble finding the cert, because its
* existence should have been proven by SetOCSPDefaultResponder.