diff --git a/libretroshare/src/pgp/rscertificate.cc b/libretroshare/src/pgp/rscertificate.cc index f78ce23e9..8ef42d2a9 100644 --- a/libretroshare/src/pgp/rscertificate.cc +++ b/libretroshare/src/pgp/rscertificate.cc @@ -8,6 +8,8 @@ #include #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) { diff --git a/libretroshare/src/pgp/rscertificate.h b/libretroshare/src/pgp/rscertificate.h index 3bbe5afd8..52820e46f 100644 --- a/libretroshare/src/pgp/rscertificate.h +++ b/libretroshare/src/pgp/rscertificate.h @@ -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) ;