Bugfixes to make pgp friend sharing work.

* added rsinit.h include so PGPSSL flag is read. (enabling ISSUER sharing)
 * extra debugging so we can see the certs being passed around.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1399 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2009-07-21 21:25:39 +00:00
parent cf60b0a0b9
commit 369bb6a5c5
3 changed files with 17 additions and 0 deletions

View File

@ -1411,12 +1411,15 @@ std::string GPGAuthMgr::SaveCertificateToString(std::string id)
if (!isPGPValid(id)) if (!isPGPValid(id))
{ {
std::cerr << "GPGAuthMgr::SaveCertificateToString() Id is Not PGP" << std::endl;
/* check if it is a SSL Certificate */ /* check if it is a SSL Certificate */
if (isValid(id)) if (isValid(id))
{ {
std::cerr << "GPGAuthMgr::SaveCertificateToString() is SSLID!" << std::endl;
std::string sslcert = AuthSSL::SaveCertificateToString(id); std::string sslcert = AuthSSL::SaveCertificateToString(id);
return sslcert; return sslcert;
} }
std::cerr << "GPGAuthMgr::SaveCertificateToString() unknown ID" << std::endl;
std::string emptystr; std::string emptystr;
return emptystr; return emptystr;
} }
@ -1450,6 +1453,11 @@ std::string GPGAuthMgr::SaveCertificateToString(std::string id)
char *export_txt = gpgme_data_release_and_get_mem(gpgmeData, &len); char *export_txt = gpgme_data_release_and_get_mem(gpgmeData, &len);
tmp = std::string(export_txt); tmp = std::string(export_txt);
std::cerr << "Exported Certificate: ";
std::cerr << std::endl;
std::cerr << tmp;
std::cerr << std::endl;
gpgme_free(export_txt); gpgme_free(export_txt);
return tmp; return tmp;

View File

@ -792,6 +792,11 @@ std::string AuthSSL::getIssuerName(std::string id)
sslMtx.unlock(); /**** UNLOCK ****/ sslMtx.unlock(); /**** UNLOCK ****/
#ifdef AUTHSSL_DEBUG
std::cerr << "AuthSSL::getIssuerName() => " << issuer;
std::cerr << std::endl;
#endif
return issuer; return issuer;
} }

View File

@ -25,6 +25,7 @@
#include "rsiface/rsiface.h" #include "rsiface/rsiface.h"
#include "rsiface/rsinit.h" /* for PGPSSL flag */
#include "rsiface/rspeers.h" #include "rsiface/rspeers.h"
#include "services/p3disc.h" #include "services/p3disc.h"
@ -67,6 +68,7 @@ const uint32_t P3DISC_FLAGS_ASK_VERSION = 0x0080;
/***** /*****
* #define P3DISC_DEBUG 1 * #define P3DISC_DEBUG 1
****/ ****/
#define P3DISC_DEBUG 1
/*********** NOTE *************** /*********** NOTE ***************
* *
@ -718,6 +720,8 @@ void p3disc::recvPeerIssuerMsg(RsDiscIssuer *item)
#ifdef P3DISC_DEBUG #ifdef P3DISC_DEBUG
std::cerr << "p3disc::recvPeerIssuerMsg() From: " << item->PeerId(); std::cerr << "p3disc::recvPeerIssuerMsg() From: " << item->PeerId();
std::cerr << std::endl; std::cerr << std::endl;
std::cerr << "p3disc::recvPeerIssuerMsg() Cert: " << item->issuerCert;
std::cerr << std::endl;
#endif #endif
/* tells us their exact address (mConnectMgr can ignore if it looks wrong) */ /* tells us their exact address (mConnectMgr can ignore if it looks wrong) */