mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-06 21:58:57 -04:00
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:
parent
1bb1aa0fc5
commit
6db7ae1fe5
3 changed files with 6 additions and 1 deletions
|
@ -1046,6 +1046,7 @@ bool GPGAuthMgr::DoOwnSignature_locked(void *data, unsigned int datalen, void *b
|
||||||
ProcessPGPmeError(ERR);
|
ProcessPGPmeError(ERR);
|
||||||
std::cerr << "GPGAuthMgr::Sign FAILED ERR: " << ERR;
|
std::cerr << "GPGAuthMgr::Sign FAILED ERR: " << ERR;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
gpgme_sign_result_t res = gpgme_op_sign_result(CTX);
|
gpgme_sign_result_t res = gpgme_op_sign_result(CTX);
|
||||||
|
|
|
@ -1057,6 +1057,10 @@ bool RsInit::GenerateSSLCertificate(std::string name, std::string org, std::
|
||||||
X509 *x509 = mgr->SignX509Req(req, days, "dummypassword");
|
X509 *x509 = mgr->SignX509Req(req, days, "dummypassword");
|
||||||
|
|
||||||
X509_REQ_free(req);
|
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 */
|
/* save to file */
|
||||||
if (x509)
|
if (x509)
|
||||||
|
|
|
@ -176,7 +176,7 @@ void GenCertDialog::genPerson()
|
||||||
/* Message Dialog */
|
/* Message Dialog */
|
||||||
QMessageBox::StandardButton sb = QMessageBox::warning ( NULL,
|
QMessageBox::StandardButton sb = QMessageBox::warning ( NULL,
|
||||||
"Generate ID Failure",
|
"Generate ID Failure",
|
||||||
"Failed to Generate your new Certificate!",
|
"Failed to Generate your new Certificate, maybe PGP password is wrong !",
|
||||||
QMessageBox::Ok);
|
QMessageBox::Ok);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue