change ssl password encryption to non symmetric

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1730 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2009-10-27 20:39:47 +00:00
parent 9132dcf700
commit a6029d69db
3 changed files with 13 additions and 4 deletions

View File

@ -1182,6 +1182,7 @@ bool GPGAuthMgr::active()
int GPGAuthMgr::InitAuth(const char *srvr_cert, const char *priv_key, int GPGAuthMgr::InitAuth(const char *srvr_cert, const char *priv_key,
const char *passwd) const char *passwd)
{ {
std::cerr << "GPGAuthMgr::InitAuth() called." << std::endl;
/* Initialise the SSL part */ /* Initialise the SSL part */
if (AuthSSL::InitAuth(srvr_cert, priv_key, passwd)) if (AuthSSL::InitAuth(srvr_cert, priv_key, passwd))
{ {
@ -1364,15 +1365,15 @@ bool GPGAuthMgr::encryptText(gpgme_data_t PLAIN, gpgme_data_t CIPHER) {
RsStackMutex stack(pgpMtx); /******* LOCKED ******/ RsStackMutex stack(pgpMtx); /******* LOCKED ******/
gpgme_encrypt_flags_t* flags = new gpgme_encrypt_flags_t(); 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 << "Error encrypting text";
std::cerr << std::endl; std::cerr << std::endl;
return false; return false;
} }
return true; return true;
} }

View File

@ -440,6 +440,7 @@ static int initLib = 0;
if (init == 1) if (init == 1)
{ {
std::cerr << "AuthSSL::InitAuth already initialized." << std::endl;
return 1; return 1;
} }

View File

@ -215,6 +215,13 @@ void p3ConfigMgr::loadConfiguration()
filename1 += metasigfname; filename1 += metasigfname;
filename2 += metafname; 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 */ /* write signature to configuration */
BinMemInterface *signbio = new BinMemInterface(1000, BIN_FLAGS_READABLE); BinMemInterface *signbio = new BinMemInterface(1000, BIN_FLAGS_READABLE);