mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 16:39:29 -05:00
added debug #ifdef to certificate handling code
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5414 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
9d3d457630
commit
4c72eaa04e
@ -8,6 +8,8 @@
|
||||
#include <pgp/pgpkeyutil.h>
|
||||
#include "rscertificate.h"
|
||||
|
||||
#define DEBUG_RSCERTIFICATE
|
||||
|
||||
static const std::string PGP_CERTIFICATE_START ( "-----BEGIN PGP PUBLIC KEY BLOCK-----" );
|
||||
static const std::string PGP_CERTIFICATE_END ( "-----END PGP PUBLIC KEY BLOCK-----" );
|
||||
static const std::string EXTERNAL_IP_BEGIN_SECTION ( "--EXT--" );
|
||||
@ -162,8 +164,9 @@ bool RsCertificate::initFromString(const std::string& instr,std::string& err_str
|
||||
|
||||
str += instr[i] ;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_RSCERTIFICATE
|
||||
std::cerr << "Decodign from:" << str << std::endl;
|
||||
#endif
|
||||
// 1 - decode the string.
|
||||
//
|
||||
char *bf = NULL ;
|
||||
@ -189,7 +192,9 @@ bool RsCertificate::initFromString(const std::string& instr,std::string& err_str
|
||||
return false ;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_RSCERTIFICATE
|
||||
std::cerr << "Packet parse: read ptag " << (int)ptag << ", size " << s << ", total_s = " << total_s << ", expected total = " << size << std::endl;
|
||||
#endif
|
||||
|
||||
switch(ptag)
|
||||
{
|
||||
|
@ -42,7 +42,7 @@ class RsCertificate
|
||||
unsigned short loc_port_us() const ;
|
||||
|
||||
const unsigned char *pgp_key() const { return binary_pgp_key ; }
|
||||
const size_t pgp_key_size() const { return binary_pgp_key_size ; }
|
||||
size_t pgp_key_size() const { return binary_pgp_key_size ; }
|
||||
|
||||
static bool cleanCertificate(const std::string& input,std::string& output,RsCertificate::Format& format,int& error_code) ;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user