mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-20 04:14:27 -04: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
1 changed files with 2 additions and 14 deletions
|
@ -1006,8 +1006,6 @@ bool RsAccountsDetail::GenerateSSLCertificate(const RsPgpId& pgp_id, const s
|
||||||
std::string key_name = keypath + kFilenameKey;
|
std::string key_name = keypath + kFilenameKey;
|
||||||
std::string cert_name = keypath + kFilenameCert;
|
std::string cert_name = keypath + kFilenameCert;
|
||||||
|
|
||||||
bool gen_ok = false;
|
|
||||||
|
|
||||||
/* Extra step required for SSL + PGP, user must have selected
|
/* Extra step required for SSL + PGP, user must have selected
|
||||||
* or generated a suitable key so the signing can happen.
|
* 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 */
|
/* save to file */
|
||||||
if (x509)
|
|
||||||
{
|
bool gen_ok = true;
|
||||||
gen_ok = true;
|
|
||||||
|
|
||||||
/* Print the signed Certificate! */
|
/* Print the signed Certificate! */
|
||||||
BIO *bio_out = NULL;
|
BIO *bio_out = NULL;
|
||||||
|
@ -1057,14 +1054,6 @@ bool RsAccountsDetail::GenerateSSLCertificate(const RsPgpId& pgp_id, const s
|
||||||
BIO_flush(bio_out);
|
BIO_flush(bio_out);
|
||||||
BIO_free(bio_out);
|
BIO_free(bio_out);
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
gen_ok = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gen_ok)
|
|
||||||
{
|
|
||||||
/* Save cert to file */
|
/* Save cert to file */
|
||||||
// open the file.
|
// open the file.
|
||||||
FILE *out = NULL;
|
FILE *out = NULL;
|
||||||
|
@ -1088,7 +1077,6 @@ bool RsAccountsDetail::GenerateSSLCertificate(const RsPgpId& pgp_id, const s
|
||||||
// store location name in a file
|
// store location name in a file
|
||||||
if(!RsDirUtil::saveStringToFile(keypath + kFilenameLocation, loc))
|
if(!RsDirUtil::saveStringToFile(keypath + kFilenameLocation, loc))
|
||||||
std::cerr << "RsInit::GenerateSSLCertificate() failed to save location name to into file." << std::endl;
|
std::cerr << "RsInit::GenerateSSLCertificate() failed to save location name to into file." << std::endl;
|
||||||
}
|
|
||||||
|
|
||||||
if (!gen_ok)
|
if (!gen_ok)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue