- made the SSL passwd more secure (10^126 different passwds now) and random, based on the internal Mersenne twister.

- kepts compatibility with existing autologin passwds. Only new locations will have a long 64 chars passwd.
- implemented storage of SSL password in gnome keyring for autologin on ubuntu
- added UBUNTU define in both .pro files.
- suppressed display of SSL passwd at login



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3993 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2011-01-29 14:27:16 +00:00
parent 25056b3623
commit 29d143bebc
5 changed files with 110 additions and 29 deletions

View file

@ -20,6 +20,7 @@
****************************************************************/
#include <rshare.h>
#include <util/rsrandom.h>
#include <retroshare/rsinit.h>
#include "GenCertDialog.h"
#include "InfoDialog.h"
@ -232,17 +233,17 @@ void GenCertDialog::genPerson()
//generate a random ssl password
std::cerr << " generating sslPasswd." << std::endl;
qsrand(time(NULL));
std::string sslPasswd = "";
const int PWD_LEN = RsInit::getSslPwdLen();
std::string sslPasswd = RSRandom::random_alphaNumericString(RsInit::getSslPwdLen()) ;
std::cerr << "Generated sslPasswd: " << sslPasswd << std::endl;
for( int i = 0 ; i < PWD_LEN ; ++i )
{
int iNumber;
iNumber = qrand()%25 + 65;
sslPasswd += (char)iNumber;
}
// const int PWD_LEN = RsInit::getSslPwdLen();
//
// for( int i = 0 ; i < PWD_LEN ; ++i )
// {
// int iNumber;
// iNumber = qrand()%(127-33) + 33;
// sslPasswd += (char)iNumber;
// }
/* Initialise the PGP user first */
RsInit::SelectGPGAccount(PGPId);