if( job->task == "sign" ) {
try {
std::shared_ptr<TBSCertificate> cert = jp->fetchTBSCert( job );
+ if( !cert ) {
+ logger::error( "Unable to load CSR" );
+ jp->failJob( job );
+ continue;
+ }
+
cert->wishFrom = job->from;
cert->wishTo = job->to;
logger::note( "INFO: Message Digest: ", cert->md );
logger::notef( "INFO: AVA %s: %s", AVA->name, AVA->value );
}
- if( !cert ) {
- logger::error( "Unable to load CSR" );
- jp->failJob( job );
- continue;
- }
-
logger::notef( "FINE: Found the CSR at '%s'", cert->csr );
cert->csr_content = readFile( keyDir + "/../" + cert->csr );
logger::note( "FINE: CSR content:\n", cert->csr_content );