libhcrypto: UI_UTIL_FLAG_VERIFY_SILENT
This commit is contained in:

committed by
Nico Williams

parent
7e0ff63b38
commit
014f16883c
@@ -138,7 +138,9 @@ add_one_principal (const char *name,
|
||||
krb5_set_error_message(context, ret, "out of memory");
|
||||
goto out;
|
||||
}
|
||||
ret = UI_UTIL_read_pw_string (pwbuf, sizeof(pwbuf), prompt, 1);
|
||||
ret = UI_UTIL_read_pw_string (pwbuf, sizeof(pwbuf), prompt,
|
||||
UI_UTIL_FLAG_VERIFY |
|
||||
UI_UTIL_FLAG_VERIFY_SILENT);
|
||||
free (prompt);
|
||||
if (ret) {
|
||||
ret = KRB5_LIBOS_BADPWDMATCH;
|
||||
|
@@ -98,7 +98,9 @@ set_password (krb5_principal principal, char *password, int keepold)
|
||||
free (princ_name);
|
||||
if (aret == -1)
|
||||
return ENOMEM;
|
||||
ret = UI_UTIL_read_pw_string(pwbuf, sizeof(pwbuf), prompt, 1);
|
||||
ret = UI_UTIL_read_pw_string(pwbuf, sizeof(pwbuf), prompt,
|
||||
UI_UTIL_FLAG_VERIFY |
|
||||
UI_UTIL_FLAG_VERIFY_SILENT);
|
||||
free (prompt);
|
||||
if(ret){
|
||||
return KRB5_LIBOS_BADPWDMATCH;
|
||||
|
@@ -99,7 +99,8 @@ stash(struct stash_options *opt, int argc, char **argv)
|
||||
random_password (buf, sizeof(buf));
|
||||
printf("Using random master stash password: %s\n", buf);
|
||||
} else {
|
||||
if(UI_UTIL_read_pw_string(buf, sizeof(buf), "Master key: ", 1)) {
|
||||
if(UI_UTIL_read_pw_string(buf, sizeof(buf), "Master key: ",
|
||||
UI_UTIL_FLAG_VERIFY)) {
|
||||
hdb_free_master_key(context, mkey);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user