diff options
| author | Simeon Simeonov | 2018-03-19 22:06:25 +0100 |
|---|---|---|
| committer | Simeon Simeonov | 2018-03-19 22:06:25 +0100 |
| commit | c6f80c49de727b9857d2bbd1eeaf85930612d0ce (patch) | |
| tree | b08d5949b28907afdea01f4745b66283f2159d79 /libsylph | |
| parent | 6edeb462320240d981ec307798c7841e50197758 (diff) | |
Add min password length spinbutton to common preferences
Diffstat (limited to 'libsylph')
| -rw-r--r-- | libsylph/masterpassword.c | 2 | ||||
| -rw-r--r-- | libsylph/prefs_common.c | 2 | ||||
| -rw-r--r-- | libsylph/prefs_common.h | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/libsylph/masterpassword.c b/libsylph/masterpassword.c index 77ff281..b86f06b 100644 --- a/libsylph/masterpassword.c +++ b/libsylph/masterpassword.c | |||
| @@ -111,7 +111,7 @@ gchar *encrypt_with_master_password(const gchar *str) { | |||
| 111 | str, | 111 | str, |
| 112 | master_password, | 112 | master_password, |
| 113 | strlen(str), | 113 | strlen(str), |
| 114 | 32, /* TODO: to be set in prefs_common */ | 114 | prefs_common.encrypted_password_min_length, |
| 115 | TRUE) != RC_OK) { | 115 | TRUE) != RC_OK) { |
| 116 | OPENSSL_cleanse(new_str, strlen(new_str)); | 116 | OPENSSL_cleanse(new_str, strlen(new_str)); |
| 117 | g_free(new_str); | 117 | g_free(new_str); |
diff --git a/libsylph/prefs_common.c b/libsylph/prefs_common.c index 6c20319..dda4a0f 100644 --- a/libsylph/prefs_common.c +++ b/libsylph/prefs_common.c | |||
| @@ -423,6 +423,8 @@ static PrefParam param[] = { | |||
| 423 | P_BOOL}, | 423 | P_BOOL}, |
| 424 | {"master_password_hash", NULL, &prefs_common.master_password_hash, | 424 | {"master_password_hash", NULL, &prefs_common.master_password_hash, |
| 425 | P_STRING}, | 425 | P_STRING}, |
| 426 | {"encrypted_password_min_length", "32", | ||
| 427 | &prefs_common.encrypted_password_min_length, P_INT}, | ||
| 426 | 428 | ||
| 427 | /* Interface */ | 429 | /* Interface */ |
| 428 | {"separate_folder", "FALSE", &prefs_common.sep_folder, P_BOOL}, | 430 | {"separate_folder", "FALSE", &prefs_common.sep_folder, P_BOOL}, |
diff --git a/libsylph/prefs_common.h b/libsylph/prefs_common.h index bc1d2f3..92333aa 100644 --- a/libsylph/prefs_common.h +++ b/libsylph/prefs_common.h | |||
| @@ -252,6 +252,7 @@ struct _PrefsCommon | |||
| 252 | /* Master password */ | 252 | /* Master password */ |
| 253 | gboolean use_master_password; | 253 | gboolean use_master_password; |
| 254 | gchar *master_password_hash; | 254 | gchar *master_password_hash; |
| 255 | guint encrypted_password_min_length; | ||
| 255 | 256 | ||
| 256 | /* Interface */ | 257 | /* Interface */ |
| 257 | gboolean sep_folder; | 258 | gboolean sep_folder; |
