summaryrefslogtreecommitdiffstats
path: root/crypto/ui
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2003-01-13 14:17:47 +0000
committerRichard Levitte <levitte@openssl.org>2003-01-13 14:17:47 +0000
commit1f7238a43433cd1e444ab279f8d780b205e8665e (patch)
tree632db8d84b2e4224aa3a81914eea337fb07f81aa /crypto/ui
parent2944c9c66514723b11259817ca028ad43e5c8025 (diff)
UI_UTIL_read_pw() misinterpreted the values returned from UI functions.
PR: 456
Diffstat (limited to 'crypto/ui')
-rw-r--r--crypto/ui/ui_util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/ui/ui_util.c b/crypto/ui/ui_util.c
index ee9730d5e2..46bc8c1a9a 100644
--- a/crypto/ui/ui_util.c
+++ b/crypto/ui/ui_util.c
@@ -78,12 +78,14 @@ int UI_UTIL_read_pw(char *buf,char *buff,int size,const char *prompt,int verify)
if (ui)
{
ok = UI_add_input_string(ui,prompt,0,buf,0,size-1);
- if (ok == 0 && verify)
+ if (ok >= 0 && verify)
ok = UI_add_verify_string(ui,prompt,0,buff,0,size-1,
buf);
- if (ok == 0)
+ if (ok >= 0)
ok=UI_process(ui);
UI_free(ui);
}
+ if (ok > 0)
+ ok = 0;
return(ok);
}