diff --git a/retroshare-gui/src/gui/GenCertDialog.cpp b/retroshare-gui/src/gui/GenCertDialog.cpp
index 67a98fa26..fc0e187b2 100644
--- a/retroshare-gui/src/gui/GenCertDialog.cpp
+++ b/retroshare-gui/src/gui/GenCertDialog.cpp
@@ -210,7 +210,9 @@ void GenCertDialog::genPerson()
std::cerr << " generating sslPasswd." << std::endl;
qsrand(time(NULL));
std::string sslPasswd = "";
- for( int i = 0 ; i < 6 ; ++i )
+ const int PWD_LEN = RsInit::getSslPwdLen();
+
+ for( int i = 0 ; i < PWD_LEN ; ++i )
{
int iNumber;
iNumber = qrand()%25 + 65;
diff --git a/retroshare-gui/src/gui/StartDialog.cpp b/retroshare-gui/src/gui/StartDialog.cpp
index ba2956184..2872a3ce2 100644
--- a/retroshare-gui/src/gui/StartDialog.cpp
+++ b/retroshare-gui/src/gui/StartDialog.cpp
@@ -55,7 +55,9 @@ StartDialog::StartDialog(QWidget *parent, Qt::WFlags flags)
ui.loadButton->setFocus();
+
connect(ui.loadButton, SIGNAL(clicked()), this, SLOT(loadPerson()));
+ connect(ui.autologin_checkbox, SIGNAL(clicked()), this, SLOT(notSecureWarning()));
/* load the Certificate File name */
std::string userName;
@@ -154,7 +156,8 @@ void StartDialog::loadPerson()
void StartDialog::loadCertificates()
{
/* Final stage of loading */
- if (RsInit::LoadCertificates(false))
+
+ if (RsInit::LoadCertificates(ui.autologin_checkbox->isChecked()))
{
close();
}
@@ -168,13 +171,15 @@ void StartDialog::loadCertificates()
}
}
+
+
void StartDialog::on_labelProfile_linkActivated(QString link)
{
//static GenCertDialog *gencertdialog = new GenCertDialog();
//gencertdialog->show();
QMessageBox::StandardButton sb = QMessageBox::question ( NULL,
- tr("Create a New Profil"),
+ tr("Create a New Profile"),
tr("This will generate a new Profile\n Are you sure you want to continue"),
(QMessageBox::Ok | QMessageBox::No));
@@ -200,3 +205,15 @@ LogoBar & StartDialog::getLogoBar() const {
return *_rsLogoBar;
}
+void StartDialog::notSecureWarning() {
+
+ /* some error msg */
+ if(ui.autologin_checkbox->isChecked()){
+ QMessageBox::StandardButton sb = QMessageBox::warning ( NULL,
+ tr("Insecure"),
+ tr("Auto Login is not Secure: Password stored on disk"),
+ QMessageBox::Ok);
+ }
+
+ return;
+}
diff --git a/retroshare-gui/src/gui/StartDialog.h b/retroshare-gui/src/gui/StartDialog.h
index d7e7c8458..b61ba49bb 100644
--- a/retroshare-gui/src/gui/StartDialog.h
+++ b/retroshare-gui/src/gui/StartDialog.h
@@ -60,6 +60,11 @@ private slots:
void closeinfodlg();
void loadPerson();
+
+ /**
+ * Warns the user that autologin is not secure
+ */
+ void notSecureWarning();
void on_labelProfile_linkActivated(QString link);
void on_labelInfo_linkActivated(QString link);
diff --git a/retroshare-gui/src/gui/StartDialog.ui b/retroshare-gui/src/gui/StartDialog.ui
index ebcebf0f9..bf7b3b96a 100644
--- a/retroshare-gui/src/gui/StartDialog.ui
+++ b/retroshare-gui/src/gui/StartDialog.ui
@@ -7,7 +7,7 @@
0
0
291
- 403
+ 433
@@ -435,7 +435,7 @@
RetroShare
-
+
:/images/rstray3.png:/images/rstray3.png
@@ -498,7 +498,7 @@ border-image: url(:/images/avatar_background.png);
-
+
:/images/user/personal64.png:/images/user/personal64.png
@@ -581,6 +581,44 @@ p, li { white-space: pre-wrap; }
+ -
+
+
+
+ 16
+ 65
+
+
+
+ QFrame::NoFrame
+
+
+ QFrame::Raised
+
+
+
+ -
+
+
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="Info"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">Info...</span></a></p></body></html>
+
+
+
+ -
+
+
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="Create new Profile..."><span style=" text-decoration: underline; color:#0000ff;">Create new Profile...</span></a></p></body></html>
+
+
+
-
@@ -630,86 +668,47 @@ p, li { white-space: pre-wrap; }
- -
-
-
-
- 16
- 65
-
-
-
- QFrame::NoFrame
-
-
- QFrame::Raised
-
-
-
- -
-
-
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
-<html><head><meta name="qrichtext" content="1" /><style type="text/css">
-p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="Create new Profile..."><span style=" text-decoration: underline; color:#0000ff;">Create new Profile...</span></a></p></body></html>
-
-
-
- -
-
-
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
-<html><head><meta name="qrichtext" content="1" /><style type="text/css">
-p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="Info"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">Info...</span></a></p></body></html>
-
-
-
- -
+
-
+
+ true
+
-
-
-
-
-
- -
+
+
-
Name (GPG Id) - location:
+ -
+
+
+ -
+
+
+ Remember Password
+
+
+ false
+
+
+
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
- loadName
loadButton
toolButton
-
+
diff --git a/retroshare-gui/src/gui/settings/GeneralPage.cpp b/retroshare-gui/src/gui/settings/GeneralPage.cpp
index 92e816d72..b65063a05 100755
--- a/retroshare-gui/src/gui/settings/GeneralPage.cpp
+++ b/retroshare-gui/src/gui/settings/GeneralPage.cpp
@@ -19,7 +19,9 @@
* Boston, MA 02110-1301, USA.
****************************************************************/
-#include "rshare.h"
+#include
+#include
+#include
#include "GeneralPage.h"
#include
#include
@@ -34,12 +36,16 @@ GeneralPage::GeneralPage(QWidget * parent, Qt::WFlags flags)
/* Create RshareSettings object */
_settings = new RshareSettings();
+ connect(ui.autoLogin, SIGNAL(clicked()), this, SLOT(setAutoLogin()));
/* Hide platform specific features */
#ifndef Q_WS_WIN
ui.chkRunRetroshareAtSystemStartup->setVisible(false);
#endif
+
+ ui.autoLogin->setChecked(RsInit::getAutoLogin());
+
}
/** Destructor */
@@ -103,3 +109,7 @@ GeneralPage::toggleShowOnStartup(bool checked)
//RshareSettings _settings;
_settings->setShowMainWindowAtStart(checked);
}
+
+void GeneralPage::setAutoLogin(){
+ RsInit::setAutoLogin(ui.autoLogin->isChecked());
+}
diff --git a/retroshare-gui/src/gui/settings/GeneralPage.h b/retroshare-gui/src/gui/settings/GeneralPage.h
index 7cc6868a1..a95ef8e4a 100755
--- a/retroshare-gui/src/gui/settings/GeneralPage.h
+++ b/retroshare-gui/src/gui/settings/GeneralPage.h
@@ -28,6 +28,7 @@
#include
#include "rsharesettings.h"
+#include "rsiface/rsiface.h"
#include "configpage.h"
#include "ui_GeneralPage.h"
@@ -57,6 +58,11 @@ private slots:
/** Called when the "show on startup" checkbox is toggled. */
void toggleShowOnStartup(bool checked);
+ /**
+ *
+ */
+ void setAutoLogin();
+
private:
/** A RetroShare Settings object used for saving/loading settings */
RshareSettings *_settings;
diff --git a/retroshare-gui/src/gui/settings/GeneralPage.ui b/retroshare-gui/src/gui/settings/GeneralPage.ui
index c056c6838..2c1c9054e 100755
--- a/retroshare-gui/src/gui/settings/GeneralPage.ui
+++ b/retroshare-gui/src/gui/settings/GeneralPage.ui
@@ -555,6 +555,13 @@
+ -
+
+
+ Auto Login
+
+
+
diff --git a/retroshare-gui/src/main.cpp b/retroshare-gui/src/main.cpp
index 9a6019f67..e2f4b0d0c 100644
--- a/retroshare-gui/src/main.cpp
+++ b/retroshare-gui/src/main.cpp
@@ -116,8 +116,8 @@ int main(int argc, char *argv[])
}
else
{
- /* don't save auto login details */
- RsInit::LoadCertificates(false);
+ // true: note auto-login is active
+ RsInit::LoadCertificates(true);
}
rsicontrol->StartupRetroShare();