From 32b07ecaf80d986b8619ba116cb01530167f9147 Mon Sep 17 00:00:00 2001 From: electron128 Date: Thu, 18 Jun 2015 14:32:33 +0000 Subject: [PATCH] removed useless ifs in rsaccounts.cc git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8523 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/rsserver/rsaccounts.cc | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/libretroshare/src/rsserver/rsaccounts.cc b/libretroshare/src/rsserver/rsaccounts.cc index d145bb296..31e00b33b 100644 --- a/libretroshare/src/rsserver/rsaccounts.cc +++ b/libretroshare/src/rsserver/rsaccounts.cc @@ -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) {