diff options
author | Eduardo Chappa <chappa@washington.edu> | 2017-05-04 22:18:35 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2017-05-04 22:18:35 -0600 |
commit | 65dea5ff595b089c5d46131381f01d84b7dfd79a (patch) | |
tree | 6164e02d0b1cb667430ff0a0fa9157b44a8977c7 | |
parent | 8f8122b0ec2d9a73b42bd0bc21781cc7fa95a1e2 (diff) | |
download | alpine-65dea5ff595b089c5d46131381f01d84b7dfd79a.tar.xz |
* Creating key for password file could not be cancelled.
-rw-r--r-- | alpine/smime.c | 4 | ||||
-rw-r--r-- | pith/pine.hlp | 2 | ||||
-rw-r--r-- | pith/smkeys.c | 8 |
3 files changed, 8 insertions, 6 deletions
diff --git a/alpine/smime.c b/alpine/smime.c index 0bdfd332..43000385 100644 --- a/alpine/smime.c +++ b/alpine/smime.c @@ -1286,7 +1286,7 @@ manage_certs_tool(struct pine *ps, int cmd, CONF_S **cl, unsigned flags) pathdir, MASTERNAME); filename[sizeof(filename)-1] = '\0'; rv = import_certificate(ctype, pc, filename); - if(our_stat(pathdir, &sbuf) == 0){ + if(rv == 1 && our_stat(pathdir, &sbuf) == 0){ if(unlink(filename) < 0) q_status_message1(SM_ORDER, 0, 2, _("Could not remove private key %s.key"), MASTERNAME); @@ -1294,7 +1294,7 @@ manage_certs_tool(struct pine *ps, int cmd, CONF_S **cl, unsigned flags) strcat(filename, ".crt"); if(unlink(filename) < 0) q_status_message1(SM_ORDER, 0, 2, - _("Could not remove public certifica %s.crt"), MASTERNAME); + _("Could not remove public certificate %s.crt"), MASTERNAME); if(rmdir(pathdir) < 0) q_status_message1(SM_ORDER, 0, 2, _("Could not remove temporary directory %s"), pathdir); diff --git a/pith/pine.hlp b/pith/pine.hlp index 846b3eb5..2f75dd38 100644 --- a/pith/pine.hlp +++ b/pith/pine.hlp @@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any reasonable place to be called from. Dummy change to get revision in pine.hlp ============= h_revision ================= -Alpine Commit 210 2017-05-03 00:58:42 +Alpine Commit 211 2017-05-04 22:18:31 ============= h_news ================= <HTML> <HEAD> diff --git a/pith/smkeys.c b/pith/smkeys.c index cd940868..46501d08 100644 --- a/pith/smkeys.c +++ b/pith/smkeys.c @@ -98,11 +98,13 @@ create_master_password(char *pass, size_t passlen, int first_time) _("Create master password \(attempt %d of %d): "), trial+1, MAXTRIAL); prompt[sizeof(prompt)- 1] = '\0'; pass[0] = '\0'; - do { + do { + /* rv == 1 means cancel */ rv = (pith_smime_enter_password)(prompt, pass, passlen); - if(password_policy_check(pass) == 0) + if(rv == 1 || password_policy_check(pass) == 0) pass[0] = '\0'; - } while ((rv !=0 && rv !=1 && rv > 0) || pass[0] == '\0'); + if(rv == 1) return 0; + } while ((rv != 0 && rv != 1) || (rv == 0 && pass[0] == '\0')); snprintf(prompt, sizeof(prompt), _("Confirm master password \(attempt %d of %d): "), trial+1, MAXTRIAL); |