mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
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:
parent
9132dcf700
commit
a6029d69db
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user