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,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);
|
||||
|
@ -440,6 +440,7 @@ static int initLib = 0;
|
||||
|
||||
if (init == 1)
|
||||
{
|
||||
std::cerr << "AuthSSL::InitAuth already initialized." << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user