Fix for 167615 - don't crash if the CRL isn't found due to a database error

This commit is contained in:
jpierre%netscape.com 2002-09-26 01:37:41 +00:00
parent 0f3d3c0654
commit 7150fbd4e4

View File

@ -40,6 +40,7 @@
#include "pcert.h"
#include "secasn1.h"
#include "blapi.h"
#include "secerr.h"
/*
* ******************** Attribute Utilities *******************************
@ -989,9 +990,13 @@ pk11_FindCrlAttribute(PK11TokenObject *object, CK_ATTRIBUTE_TYPE type)
case CKA_VALUE:
break;
default:
return NULL;
PORT_SetError(SEC_ERROR_INVALID_ARGS);
return NULL;
}
crl = pk11_getCrl(object);
if (!crl) {
return NULL;
}
switch (type) {
case CKA_NETSCAPE_URL:
if (crl->url == NULL) {