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

@ -1046,6 +1046,7 @@ bool GPGAuthMgr::DoOwnSignature_locked(void *data, unsigned int datalen, void *b
ProcessPGPmeError(ERR);
std::cerr << "GPGAuthMgr::Sign FAILED ERR: " << ERR;
std::cerr << std::endl;
return false;
}
gpgme_sign_result_t res = gpgme_op_sign_result(CTX);

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)

View File

@ -176,7 +176,7 @@ void GenCertDialog::genPerson()
/* Message Dialog */
QMessageBox::StandardButton sb = QMessageBox::warning ( NULL,
"Generate ID Failure",
"Failed to Generate your new Certificate!",
"Failed to Generate your new Certificate, maybe PGP password is wrong !",
QMessageBox::Ok);
}
}