X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Fapps%2Fclient.cpp;h=e30803e690ba333e6c0f828df4e9675a9a7f89ed;hb=e4a2b7cebcc4b38f1b7181f02c6fcb694fa0af8a;hp=7c5bf0888b5a9bb3ac6996e7e02cd1ec19ca2aa7;hpb=3ea4de25c712971a35dbad27d8834d75933daa08;p=cassiopeia.git diff --git a/src/apps/client.cpp b/src/apps/client.cpp index 7c5bf08..e30803e 100644 --- a/src/apps/client.cpp +++ b/src/apps/client.cpp @@ -159,8 +159,14 @@ int main( int argc, const char* argv[] ) { log << "FINE: CERTIFICATE LOG: " << res->log << std::endl; log << "FINE: CERTIFICATE:" << std::endl << res->certificate << std::endl; std::string fn = writeBackFile( job->target.c_str(), res->certificate, keyDir ); + if( fn.empty() ) { + log << "ERROR: Writeback of the certificate failed." << std::endl; + jp->failJob( job ); + continue; + } + res->crt_name = fn; - jp->writeBack( job, res ); + jp->writeBack( job, res ); //! \FIXME: Check return value log << "FINE: signing done." << std::endl; if( DAEMON ) {