hxtool: Check hx509_request_init() return
authorNicolas Williams <nico@twosigma.com>
Wed, 4 Jan 2023 22:17:57 +0000 (16:17 -0600)
committerNicolas Williams <nico@twosigma.com>
Wed, 4 Jan 2023 22:17:57 +0000 (16:17 -0600)
lib/hx509/hxtool.c

index 95f8d53af9584632f6d7d0b39c001e5e39afd474..866e4bfcab21ab2f39f2aed5e064e51ccda05a4d 100644 (file)
@@ -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;