mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-14 20:12:29 -04:00
corrected a few bugs in the cert cleaning method. Added feedback to the GUI and error codes for the cert cleaning function of rspeers
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4580 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
3ff69a1be5
commit
8941aa5991
6 changed files with 81 additions and 32 deletions
|
@ -1285,13 +1285,13 @@ bool p3Peers::loadDetailsFromStringCert(const std::string &certstr, RsPeerDetai
|
|||
}
|
||||
}
|
||||
|
||||
bool p3Peers::cleanCertificate(const std::string &certstr, std::string &cleanCert)
|
||||
bool p3Peers::cleanCertificate(const std::string &certstr, std::string &cleanCert,int& error_code)
|
||||
{
|
||||
std::string cert;
|
||||
std::string peerInfo;
|
||||
|
||||
if (splitCert(certstr, cert, peerInfo)) {
|
||||
cleanCert = cleanUpCertificate(cert);
|
||||
cleanCert = cleanUpCertificate(cert,error_code);
|
||||
if (!cleanCert.empty()) {
|
||||
if (!peerInfo.empty()) {
|
||||
if (*cleanCert.rbegin() != '\n') {
|
||||
|
|
|
@ -99,7 +99,7 @@ virtual bool hasExportMinimal() ;
|
|||
|
||||
virtual bool loadCertificateFromFile(const std::string &fname, std::string &id, std::string &gpg_id);
|
||||
virtual bool loadDetailsFromStringCert(const std::string &cert, RsPeerDetails &pd, std::string& error_string);
|
||||
virtual bool cleanCertificate(const std::string &certstr, std::string &cleanCert);
|
||||
virtual bool cleanCertificate(const std::string &certstr, std::string &cleanCert,int& error_code);
|
||||
virtual bool saveCertificateToFile(const std::string &id, const std::string &fname);
|
||||
virtual std::string saveCertificateToString(const std::string &id);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue