From 485b5d575a5a7613d23712311b6cc0d091ed8a37 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Wed, 4 Jan 2023 16:17:57 -0600 Subject: [PATCH] hxtool: Check hx509_request_init() return --- lib/hx509/hxtool.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/hx509/hxtool.c b/lib/hx509/hxtool.c index 95f8d53af..866e4bfca 100644 --- a/lib/hx509/hxtool.c +++ b/lib/hx509/hxtool.c @@ -1493,7 +1493,9 @@ request_create(struct request_create_options *opt, int argc, char **argv) opt->key_bits_integer, &signer); - hx509_request_init(context, &req); + ret = hx509_request_init(context, &req); + if (ret) + hx509_err(context, 1, ret, "Could not initialize CSR context"); if (opt->subject_string) { hx509_name name = NULL;