X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=apps%2Fgenrsa.c;h=ebf9c5532934685ccb5f64cfe80e9db1287cd80b;hp=2f8960f959df900fa40dabb7922214f9fe4e0e0c;hb=HEAD;hpb=fecb3aae22aeda493f348739ebf7943071ecdbe1 diff --git a/apps/genrsa.c b/apps/genrsa.c index 2f8960f959..54d025e24c 100644 --- a/apps/genrsa.c +++ b/apps/genrsa.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -179,7 +179,8 @@ opthelp: if (out == NULL) goto end; - if (!init_gen_str(&ctx, "RSA", eng, 0, NULL, NULL)) + if (!init_gen_str(&ctx, "RSA", eng, 0, app_get0_libctx(), + app_get0_propq())) goto end; if (verbose) @@ -203,6 +204,8 @@ opthelp: goto end; } pkey = app_keygen(ctx, "RSA", num, verbose); + if (pkey == NULL) + goto end; if (verbose) { BIGNUM *e = NULL;