mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
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:
parent
cf60b0a0b9
commit
369bb6a5c5
@ -1411,12 +1411,15 @@ std::string GPGAuthMgr::SaveCertificateToString(std::string id)
|
||||
|
||||
if (!isPGPValid(id))
|
||||
{
|
||||
std::cerr << "GPGAuthMgr::SaveCertificateToString() Id is Not PGP" << std::endl;
|
||||
/* check if it is a SSL Certificate */
|
||||
if (isValid(id))
|
||||
{
|
||||
std::cerr << "GPGAuthMgr::SaveCertificateToString() is SSLID!" << std::endl;
|
||||
std::string sslcert = AuthSSL::SaveCertificateToString(id);
|
||||
return sslcert;
|
||||
}
|
||||
std::cerr << "GPGAuthMgr::SaveCertificateToString() unknown ID" << std::endl;
|
||||
std::string 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);
|
||||
tmp = std::string(export_txt);
|
||||
|
||||
std::cerr << "Exported Certificate: ";
|
||||
std::cerr << std::endl;
|
||||
std::cerr << tmp;
|
||||
std::cerr << std::endl;
|
||||
|
||||
gpgme_free(export_txt);
|
||||
|
||||
return tmp;
|
||||
|
@ -792,6 +792,11 @@ std::string AuthSSL::getIssuerName(std::string id)
|
||||
|
||||
sslMtx.unlock(); /**** UNLOCK ****/
|
||||
|
||||
#ifdef AUTHSSL_DEBUG
|
||||
std::cerr << "AuthSSL::getIssuerName() => " << issuer;
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
return issuer;
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
|
||||
#include "rsiface/rsiface.h"
|
||||
#include "rsiface/rsinit.h" /* for PGPSSL flag */
|
||||
#include "rsiface/rspeers.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
|
||||
|
||||
/*********** NOTE ***************
|
||||
*
|
||||
@ -718,6 +720,8 @@ void p3disc::recvPeerIssuerMsg(RsDiscIssuer *item)
|
||||
#ifdef P3DISC_DEBUG
|
||||
std::cerr << "p3disc::recvPeerIssuerMsg() From: " << item->PeerId();
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "p3disc::recvPeerIssuerMsg() Cert: " << item->issuerCert;
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
/* tells us their exact address (mConnectMgr can ignore if it looks wrong) */
|
||||
|
Loading…
Reference in New Issue
Block a user