diff options
author | Daniel Fiala <daniel@openssl.org> | 2022-03-16 07:42:55 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-03-17 14:41:07 +0100 |
commit | 0a9bb445893b4a98ad1588aef2d14c29e6c4c5e3 (patch) | |
tree | 577b0b35dec25d1d88086e442bc91ce324eb58ac /apps | |
parent | 60f3fa75945d97ec6f008424d2c5b6b4165fc152 (diff) |
Check password length only when verify is enabled.
Fixes #16231.
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17899)
Diffstat (limited to 'apps')
-rw-r--r-- | apps/apps.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/apps.c b/apps/apps.c index 1a92271595..db5b48e4cf 100644 --- a/apps/apps.c +++ b/apps/apps.c @@ -307,6 +307,8 @@ int password_callback(char *buf, int bufsiz, int verify, PW_CB_DATA *cb_tmp) if (cb_data != NULL && cb_data->password != NULL && *(const char*)cb_data->password != '\0') pw_min_len = 1; + else if (!verify) + pw_min_len = 0; prompt = UI_construct_prompt(ui, "pass phrase", prompt_info); if (!prompt) { BIO_printf(bio_err, "Out of memory\n"); |