diff --git a/libretroshare/src/pqi/authgpg.cc b/libretroshare/src/pqi/authgpg.cc index f6b0960db..b05374c48 100644 --- a/libretroshare/src/pqi/authgpg.cc +++ b/libretroshare/src/pqi/authgpg.cc @@ -1182,7 +1182,8 @@ bool GPGAuthMgr::active() int GPGAuthMgr::InitAuth(const char *srvr_cert, const char *priv_key, const char *passwd) { - /* Initialise the SSL part */ + std::cerr << "GPGAuthMgr::InitAuth() called." << std::endl; + /* Initialise the SSL part */ if (AuthSSL::InitAuth(srvr_cert, priv_key, passwd)) { RsStackMutex stack(pgpMtx); /******* LOCKED ******/ @@ -1364,15 +1365,15 @@ bool GPGAuthMgr::encryptText(gpgme_data_t PLAIN, gpgme_data_t CIPHER) { RsStackMutex stack(pgpMtx); /******* LOCKED ******/ gpgme_encrypt_flags_t* flags = new gpgme_encrypt_flags_t(); + gpgme_key_t keys[2] = {mOwnGpgCert.key, NULL}; - if (GPG_ERR_NO_ERROR != gpgme_op_encrypt(CTX, NULL, *flags, PLAIN, CIPHER)) + if (GPG_ERR_NO_ERROR != gpgme_op_encrypt(CTX, keys, *flags, PLAIN, CIPHER)) { std::cerr << "Error encrypting text"; std::cerr << std::endl; return false; } - return true; } @@ -1835,7 +1836,7 @@ int GPGAuthMgr::signCertificate(std::string id) } gpgme_key_t signKey = it->second.key; - gpgme_key_t ownKey = mOwnGpgCert.key; + gpgme_key_t ownKey = mOwnGpgCert.key; class SignParams sparams("0", passphrase); class EditParams params(SIGN_START, &sparams); diff --git a/libretroshare/src/pqi/authssl.cc b/libretroshare/src/pqi/authssl.cc index b43102df3..930aebc86 100644 --- a/libretroshare/src/pqi/authssl.cc +++ b/libretroshare/src/pqi/authssl.cc @@ -440,6 +440,7 @@ static int initLib = 0; if (init == 1) { + std::cerr << "AuthSSL::InitAuth already initialized." << std::endl; return 1; } diff --git a/libretroshare/src/pqi/p3cfgmgr.cc b/libretroshare/src/pqi/p3cfgmgr.cc index 6c8c04768..d1e77f239 100644 --- a/libretroshare/src/pqi/p3cfgmgr.cc +++ b/libretroshare/src/pqi/p3cfgmgr.cc @@ -215,6 +215,13 @@ void p3ConfigMgr::loadConfiguration() filename1 += metasigfname; filename2 += metafname; + #ifdef CONFIG_DEBUG + std::cerr << "p3ConfigMgr::loadConfiguration() filename1 : " << filename1; + std::cerr << std::endl; + std::cerr << "p3ConfigMgr::loadConfiguration() filename2 : " << filename2; + std::cerr << std::endl; + #endif + /* write signature to configuration */ BinMemInterface *signbio = new BinMemInterface(1000, BIN_FLAGS_READABLE);