X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Fcrypto%2FsimpleOpensslSigner.cpp;h=b6005b7483c112e85ed108f0939331a582c94ae8;hb=e8f8107bdd0d1149117f06e10b145ef00d5543fb;hp=dce6025fe4ebadc44ce0d7d0812d6578664ff623;hpb=b14903fa5cded58b70beb4e84fb0409011b6e7aa;p=cassiopeia.git diff --git a/src/crypto/simpleOpensslSigner.cpp b/src/crypto/simpleOpensslSigner.cpp index dce6025..b6005b7 100644 --- a/src/crypto/simpleOpensslSigner.cpp +++ b/src/crypto/simpleOpensslSigner.cpp @@ -190,7 +190,14 @@ std::shared_ptr SimpleOpensslSigner::sign( std::shared_ptr output = c.sign( ca->caKey, cert->md ); signlog << "FINE: all went well" << std::endl; - 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; output->ca_name = ca->name; output->log = signlog.str(); return output;