Remove some RsPeers related dead code

This commit is contained in:
Gioacchino Mazzurco 2019-10-06 23:20:18 +02:00
parent 563260d012
commit ab93d31d17
No known key found for this signature in database
GPG Key ID: A1FBCA3872E87051
3 changed files with 4 additions and 35 deletions

View File

@ -712,7 +712,6 @@ public:
/* Auth Stuff */
virtual std::string getPGPKey(const RsPgpId& pgp_id,bool include_signatures) = 0;
virtual bool GetPGPBase64StringAndCheckSum(const RsPgpId& gpg_id,std::string& gpg_base64_string,std::string& gpg_base64_checksum) = 0;
virtual bool hasExportMinimal() = 0;
/**
* @brief Import certificate into the keyring
@ -746,8 +745,9 @@ public:
std::string& error_string )=0;
// Certificate utils
virtual bool cleanCertificate(const std::string &certstr, std::string &cleanCert,bool& is_short_format,uint32_t& error_code) = 0;
virtual bool saveCertificateToFile(const RsPeerId& id, const std::string &fname) = 0;
virtual bool cleanCertificate(
const std::string& certstr, std::string& cleanCert,
bool& is_short_format, uint32_t& error_code ) = 0;
virtual std::string saveCertificateToString(const RsPeerId &id) = 0;
virtual bool signGPGCertificate(const RsPgpId &gpg_id) = 0;

View File

@ -115,19 +115,7 @@ std::string RsPeerNetModeString(uint32_t netModel)
p3Peers::p3Peers(p3LinkMgr *lm, p3PeerMgr *pm, p3NetMgr *nm)
:mLinkMgr(lm), mPeerMgr(pm), mNetMgr(nm)
{
return;
}
bool p3Peers::hasExportMinimal()
{
#ifdef GPGME_EXPORT_MODE_MINIMAL
return true ;
#else
return false ;
#endif
}
:mLinkMgr(lm), mPeerMgr(pm), mNetMgr(nm) {}
/* Updates ... */
bool p3Peers::FriendsChanged(bool add)
@ -1677,22 +1665,6 @@ bool p3Peers::cleanCertificate(const std::string &certstr, std::string &cleanCer
return res;
}
bool p3Peers::saveCertificateToFile(const RsPeerId &id, const std::string &/*fname*/)
{
/* remove unused parameter warnings */
(void) id;
#ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::SaveCertificateToFile() not implemented yet " << id;
std::cerr << std::endl;
#endif
// ensureExtension(fname, "pqi");
//
// return AuthSSL::getAuthSSL()->SaveCertificateToFile(id, fname);
return false;
}
std::string p3Peers::saveCertificateToString(const RsPeerId &id)
{
#ifdef P3PEERS_DEBUG

View File

@ -159,14 +159,11 @@ public:
const std::string& invite,
ServicePermissionFlags flags = RS_NODE_PERM_DEFAULT );
virtual bool hasExportMinimal();
virtual bool loadCertificateFromString(const std::string& cert, RsPeerId& ssl_id,RsPgpId& pgp_id, std::string& error_string);
virtual bool loadPgpKeyFromBinaryData( const unsigned char *bin_key_data,uint32_t bin_key_len, RsPgpId& gpg_id, std::string& error_string );
virtual bool loadDetailsFromStringCert(const std::string &cert, RsPeerDetails &pd, uint32_t& error_code);
virtual bool cleanCertificate(const std::string &certstr, std::string &cleanCert, bool &is_short_format, uint32_t& error_code) override;
virtual bool saveCertificateToFile(const RsPeerId &id, const std::string &fname);
virtual std::string saveCertificateToString(const RsPeerId &id);
virtual bool signGPGCertificate(const RsPgpId &id);