mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
solve a bug with gpg signature summary
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2119 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
bf36fd86bf
commit
8bfd696430
2 changed files with 9 additions and 6 deletions
|
@ -950,9 +950,10 @@ bool RsInit::GenerateSSLCertificate(std::string gpg_id, std::string org, std
|
|||
/* try to load it, and get Id */
|
||||
|
||||
std::string location;
|
||||
int ret = 0;
|
||||
|
||||
ret = LoadCheckX509andGetLocation(cert_name.c_str(), location, sslId);
|
||||
if (LoadCheckX509andGetLocation(cert_name.c_str(), location, sslId) == 0) {
|
||||
std::cerr << "RsInit::GenerateSSLCertificate() Cannot check own signature, maybe the files are corrupted." << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Move directory to correct id */
|
||||
std::string finalbase = RsInitConfig::basedir + RsInitConfig::dirSeperator + sslId + RsInitConfig::dirSeperator;
|
||||
|
@ -1106,7 +1107,9 @@ int RsInit::LoadCertificates(bool autoLoginNT)
|
|||
gpgme_data_new_from_stream (&cipher, sslPassphraseFile);
|
||||
if (0 < AuthGPG::getAuthGPG()->encryptText(plain, cipher)) {
|
||||
std::cerr << "Encrypting went ok !" << std::endl;
|
||||
}
|
||||
} else {
|
||||
std::cerr << "Encrypting went wrong !" << std::endl;
|
||||
}
|
||||
gpgme_data_release (cipher);
|
||||
gpgme_data_release (plain);
|
||||
fclose(sslPassphraseFile);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue