mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-01 20:52:05 -04:00
- moved pgpkey.h/cc into pgp directory
- fixed bug in key cleaning code git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-OpenPGP@5291 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f5c276c9b5
commit
ddf503a793
7 changed files with 18 additions and 7 deletions
|
@ -34,7 +34,7 @@
|
|||
#include "pgp/pgphandler.h"
|
||||
|
||||
#include <util/rsdir.h>
|
||||
#include <util/pgpkey.h>
|
||||
#include <pgp/pgpkeyutil.h>
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
|
|
|
@ -287,7 +287,18 @@ std::string cleanUpCertificate(const std::string& badCertificate,int& error_code
|
|||
while(currBadCertIdx < endCertStartIdx1 && (badCertificate[currBadCertIdx] == '=' || badCertificate[currBadCertIdx] == ' ' || badCertificate[currBadCertIdx] == '\n' ))
|
||||
currBadCertIdx++ ;
|
||||
|
||||
cleanCertificate += "==\n=";
|
||||
switch(cntPerLine % 4)
|
||||
{
|
||||
case 0: break ;
|
||||
case 1: std::cerr<<"Certificate corrupted beyond repair: wrongnumber of chars on last line (n%4=1)"<<std::endl;
|
||||
error_code = RS_PEER_CERT_CLEANING_CODE_WRONG_NUMBER;
|
||||
return badCertificate ;
|
||||
case 2: cleanCertificate += "==" ;
|
||||
break ;
|
||||
case 3: cleanCertificate += "=" ;
|
||||
break ;
|
||||
}
|
||||
cleanCertificate += "\n=";
|
||||
|
||||
// if (badCertificate[currBadCertIdx] == '=')
|
||||
// {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue