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:
csoler 2011-08-30 21:49:49 +00:00
parent 3ff69a1be5
commit 8941aa5991
6 changed files with 81 additions and 32 deletions

View file

@ -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') {

View file

@ -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);