diff options
author | tedu <> | 2016-04-28 16:42:28 +0000 |
---|---|---|
committer | tedu <> | 2016-04-28 16:42:28 +0000 |
commit | 8da506fe86ae4114f94c896522d4bf388c1bfded (patch) | |
tree | 70344300147c2eaccaf200613eabc0143e594a1c /src | |
parent | 89acd8206b86ff8f479e0dc051a65e8fec47257c (diff) | |
download | openbsd-8da506fe86ae4114f94c896522d4bf388c1bfded.tar.gz openbsd-8da506fe86ae4114f94c896522d4bf388c1bfded.tar.bz2 openbsd-8da506fe86ae4114f94c896522d4bf388c1bfded.zip |
don't go into an unbreakable infinite loop during operations such
as reading passwords. allow ^C to break.
the pain was mine, the fix is miod's.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/ui/ui_lib.c | 3 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/ui/ui_lib.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ui/ui_lib.c b/src/lib/libcrypto/ui/ui_lib.c index 1c7f81d1f1..80f0992ddd 100644 --- a/src/lib/libcrypto/ui/ui_lib.c +++ b/src/lib/libcrypto/ui/ui_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ui_lib.c,v 1.30 2015/02/10 11:22:21 jsing Exp $ */ | 1 | /* $OpenBSD: ui_lib.c,v 1.31 2016/04/28 16:42:28 tedu Exp $ */ |
2 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL | 2 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL |
3 | * project 2001. | 3 | * project 2001. |
4 | */ | 4 | */ |
@@ -491,6 +491,7 @@ UI_process(UI *ui) | |||
491 | switch (ui->meth->ui_read_string(ui, | 491 | switch (ui->meth->ui_read_string(ui, |
492 | sk_UI_STRING_value(ui->strings, i))) { | 492 | sk_UI_STRING_value(ui->strings, i))) { |
493 | case -1: /* Interrupt/Cancel/something... */ | 493 | case -1: /* Interrupt/Cancel/something... */ |
494 | ui->flags &= ~UI_FLAG_REDOABLE; | ||
494 | ok = -2; | 495 | ok = -2; |
495 | goto err; | 496 | goto err; |
496 | case 0: /* Errors */ | 497 | case 0: /* Errors */ |
diff --git a/src/lib/libssl/src/crypto/ui/ui_lib.c b/src/lib/libssl/src/crypto/ui/ui_lib.c index 1c7f81d1f1..80f0992ddd 100644 --- a/src/lib/libssl/src/crypto/ui/ui_lib.c +++ b/src/lib/libssl/src/crypto/ui/ui_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ui_lib.c,v 1.30 2015/02/10 11:22:21 jsing Exp $ */ | 1 | /* $OpenBSD: ui_lib.c,v 1.31 2016/04/28 16:42:28 tedu Exp $ */ |
2 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL | 2 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL |
3 | * project 2001. | 3 | * project 2001. |
4 | */ | 4 | */ |
@@ -491,6 +491,7 @@ UI_process(UI *ui) | |||
491 | switch (ui->meth->ui_read_string(ui, | 491 | switch (ui->meth->ui_read_string(ui, |
492 | sk_UI_STRING_value(ui->strings, i))) { | 492 | sk_UI_STRING_value(ui->strings, i))) { |
493 | case -1: /* Interrupt/Cancel/something... */ | 493 | case -1: /* Interrupt/Cancel/something... */ |
494 | ui->flags &= ~UI_FLAG_REDOABLE; | ||
494 | ok = -2; | 495 | ok = -2; |
495 | goto err; | 496 | goto err; |
496 | case 0: /* Errors */ | 497 | case 0: /* Errors */ |