diff options
author | Richard Levitte <levitte@openssl.org> | 2019-11-14 12:09:42 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-11-22 15:19:19 +0100 |
commit | 72a5412b4858cc7c5627a121f78685a2a4065521 (patch) | |
tree | 6632a6d7b732823ef60499492b14063118f73e8e | |
parent | 3478a2102e8bfc63f20e22826ab39b407ff43f62 (diff) | |
download | openssl-72a5412b4858cc7c5627a121f78685a2a4065521.tar.gz |
UI_UTIL_wrap_read_pem_callback(): when |cb| is NULL, use PEM_def_callback
Fixes #10444
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10447)
-rw-r--r-- | crypto/ui/ui_util.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/ui/ui_util.c b/crypto/ui/ui_util.c index b28c13324a..f64780a6a2 100644 --- a/crypto/ui/ui_util.c +++ b/crypto/ui/ui_util.c @@ -8,6 +8,7 @@ */ #include <string.h> +#include <openssl/pem.h> /* PEM_def_callback() */ #include "internal/thread_once.h" #include "ui_local.h" @@ -156,7 +157,7 @@ UI_METHOD *UI_UTIL_wrap_read_pem_callback(pem_password_cb *cb, int rwflag) return NULL; } data->rwflag = rwflag; - data->cb = cb; + data->cb = cb != NULL ? cb : PEM_def_callback; return ui_method; } |