hcrypto: print failure on password mismatch (#469)
UI_UTIL_read_pw_string(), an interface borrowed from OpenSSL, should report password verification failure to stderr.
This commit is contained in:
@@ -205,8 +205,11 @@ UI_UTIL_read_pw_string(char *buf, int length, const char *prompt, int verify)
|
||||
free(buf2);
|
||||
return ret;
|
||||
}
|
||||
if (strcmp(buf2, buf) != 0)
|
||||
if (strcmp(buf2, buf) != 0) {
|
||||
fprintf(stderr, "Verify failure\n");
|
||||
fflush(stderr);
|
||||
ret = 1;
|
||||
}
|
||||
free(buf2);
|
||||
}
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user