mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-14 00:49:41 -05:00
removed useless ifs in rsaccounts.cc
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8523 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8049d09f8d
commit
32b07ecaf8
@ -1006,8 +1006,6 @@ bool RsAccountsDetail::GenerateSSLCertificate(const RsPgpId& pgp_id, const s
|
||||
std::string key_name = keypath + kFilenameKey;
|
||||
std::string cert_name = keypath + kFilenameCert;
|
||||
|
||||
bool gen_ok = false;
|
||||
|
||||
/* Extra step required for SSL + PGP, user must have selected
|
||||
* or generated a suitable key so the signing can happen.
|
||||
*/
|
||||
@ -1039,9 +1037,8 @@ bool RsAccountsDetail::GenerateSSLCertificate(const RsPgpId& pgp_id, const s
|
||||
}
|
||||
|
||||
/* save to file */
|
||||
if (x509)
|
||||
{
|
||||
gen_ok = true;
|
||||
|
||||
bool gen_ok = true;
|
||||
|
||||
/* Print the signed Certificate! */
|
||||
BIO *bio_out = NULL;
|
||||
@ -1057,14 +1054,6 @@ bool RsAccountsDetail::GenerateSSLCertificate(const RsPgpId& pgp_id, const s
|
||||
BIO_flush(bio_out);
|
||||
BIO_free(bio_out);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
gen_ok = false;
|
||||
}
|
||||
|
||||
if (gen_ok)
|
||||
{
|
||||
/* Save cert to file */
|
||||
// open the file.
|
||||
FILE *out = NULL;
|
||||
@ -1088,7 +1077,6 @@ bool RsAccountsDetail::GenerateSSLCertificate(const RsPgpId& pgp_id, const s
|
||||
// store location name in a file
|
||||
if(!RsDirUtil::saveStringToFile(keypath + kFilenameLocation, loc))
|
||||
std::cerr << "RsInit::GenerateSSLCertificate() failed to save location name to into file." << std::endl;
|
||||
}
|
||||
|
||||
if (!gen_ok)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user