- signlog << "FINE: crt went to: " << writeBackFile( num, output->certificate, ca->path ) << std::endl;
+ std::string fn = writeBackFile( num, output->certificate, ca->path );
+
+ if( fn.empty() ) {
+ signlog << "ERROR: failed to get filename for storage of signed certificate." << std::endl;
+ throw "Storage location could not be determined";
+ }
+
+ signlog << "FINE: crt went to: " << fn << std::endl;