Skip to content

Commit

Permalink
UI_UTIL_read_pw() misinterpreted the values returned from UI functions.
Browse files Browse the repository at this point in the history
PR: 456
  • Loading branch information
levitte committed Jan 13, 2003
1 parent 9d5390a commit 364c7cd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crypto/ui/ui_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 364c7cd

Please sign in to comment.