add error handling. Maybe some code review ciould be a good idea

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1556 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2009-08-18 12:44:54 +00:00
parent 1bb1aa0fc5
commit 6db7ae1fe5
3 changed files with 6 additions and 1 deletions

View file

@ -1057,6 +1057,10 @@ bool RsInit::GenerateSSLCertificate(std::string name, std::string org, std::
X509 *x509 = mgr->SignX509Req(req, days, "dummypassword");
X509_REQ_free(req);
if (x509 == NULL) {
fprintf(stderr,"RsGenerateCert() Couldn't sign ssl certificate. Probably PGP password is wrong.\n");
return false;
}
/* save to file */
if (x509)