49 iCertRequest, CRYPT_IATTRIBUTE_ISSUERANDSERIALNUMBER );
52 return( getItemData( dbmsInfo, iCertificate, &dummy,
139 "Couldn't create CRL entry from certificate to be "
179 CRYPT_IATTRIBUTE_INITIALISED );
185 "Couldn't add revocation status information to CRL for "
186 "certificate revocation" ) );
188 status = caRevokeCert( dbmsInfo, iLocalCRL, iCertificate, action,
263 status = getCertToRevoke( dbmsInfo, &iLocalCertificate,
264 iCertRequest, errorInfo );
269 "Couldn't find certificate to revoke in "
270 "certificate store: " ) );
284 CRYPT_IATTRIBUTE_REVREQUEST );
293 "Couldn't create CRL from revocation request" ) );
309 status = extractCertData( iLocalCRL, CRYPT_IATTRIBUTE_CRLENTRY,
323 "Couldn't extract CRL data to add to certificate store" ) );
332 memcpy( specialCertID, subjCertID, subjCertIDlength );
344 status = addCRL( dbmsInfo, iLocalCRL, iLocalCertificate,
348 status = updateCertLog( dbmsInfo, action, NULL, 0, reqCertIDptr,
349 reqCertIDlength, subjCertID,
350 subjCertIDlength, certData, certDataLength,
356 setBoundData( boundDataPtr, 0, reqCertID, reqCertIDlength );
358 "DELETE FROM certRequests WHERE certID = ?",
367 specialCertIDlength );
369 "DELETE FROM certificates WHERE certID = ?",
374 setBoundData( boundDataPtr, 0, subjCertID, subjCertIDlength );
376 "DELETE FROM certificates WHERE certID = ?",
397 updateCertErrorLog( dbmsInfo, status,
399 "Certificate issue reversal operation failed, "
400 "performing straight delete" : \
403 "Revocation of certificate to be replaced failed, "
404 "performing straight delete" :
405 "Certificate revocation operation failed",
406 NULL, 0, reqCertIDptr, reqCertIDlength, NULL, 0,
416 "Certificate issue reversal operation failed: " : \
419 "Revocation of certificate to be replaced "
421 "Certificate revocation operation failed: " ) );
432 setBoundData( boundDataPtr, 0, specialCertID, specialCertIDlength );
434 "DELETE FROM certificates WHERE certID = ?",
439 setBoundData( boundDataPtr, 0, subjCertID, subjCertIDlength );
441 "DELETE FROM certificates WHERE certID = ?",
449 "Warning: Direct certificate revocation operation failed, "
450 "revocation was handled via straight delete" ) );
454 updateCertErrorLogMsg( dbmsInfo, status,
455 "Fallback straight delete failed" );
459 "Certificate issue reversal operation failed: " : \
462 "Revocation of certificate to be replaced failed: " :
463 "Certificate revocation operation failed: " ) );
480 crlEntry : (
void * ) crlEntryBuffer;
483 char *operationString =
"No error";
484 int operationStatus =
CRYPT_OK, nameIDlength;
485 int errorCount, iterationCount,
status;
496 caKey, CRYPT_IATTRIBUTE_SUBJECT );
514 "SELECT certData FROM CRLs WHERE nameID = ?",
515 NULL, 0, NULL, boundDataPtr,
522 "Couldn't initiate CRL data fetch from certificate "
531 for( errorCount = 0, iterationCount = 0;
553 status = base64decode( crlEntry,
MAX_CERT_SIZE, &crlEntryLength,
554 crlEntryBuffer, crlEntryLength,
563 operationString =
"Some CRL entries couldn't be read from "
564 "the certificate store";
574 CRYPT_IATTRIBUTE_CRLENTRY );
581 operationString =
"Some CRL entries couldn't be added to "
588 crlEntryAdded =
TRUE;
591 iterationCount >= FAILSAFE_ITERATIONS_LARGE )
602 DEBUG_DIAG((
"CRL-entry-fetch loop detected" ));
611 updateCertErrorLogMsg( dbmsInfo, operationStatus,
612 "No CRL entries could be added to the "
615 ( operationStatus, errorInfo,
616 "No CRL entries could be added to the CRL" ) );
621 updateCertErrorLogMsg( dbmsInfo, operationStatus, operationString );
633 updateCertErrorLogMsg( dbmsInfo, operationStatus,
634 "CRL creation failed" );
637 "Couldn't sign CRL to be issued" ) );