mirror of
https://github.com/openssl/openssl.git
synced 2024-12-15 13:03:39 +08:00
UI_UTIL_read_pw() misinterpreted the values returned from UI functions.
PR: 456
This commit is contained in:
parent
9d5390a049
commit
364c7cd621
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user