X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;f=apps%2Fdsa.c;h=629ba1d9e39bc386933c1a1b485dc7b49c9c96da;hb=584410227ab3afd3d296408ca096409cd677ee10;hp=89599fc5c2381751db0d6d2ab11aae61c68eea9a;hpb=2234212c3dde887e0b7fa08277d035cd132e2cce;p=openssl.git diff --git a/apps/dsa.c b/apps/dsa.c index 89599fc5c2..629ba1d9e3 100644 --- a/apps/dsa.c +++ b/apps/dsa.c @@ -1,7 +1,7 @@ /* - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * - * Licensed under the OpenSSL license (the "License"). You may not use + * 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 * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html @@ -17,6 +17,7 @@ NON_EMPTY_TRANSLATION_UNIT # include # include # include "apps.h" +# include "progs.h" # include # include # include @@ -217,6 +218,9 @@ int dsa_main(int argc, char **argv) } else if (outformat == FORMAT_MSBLOB || outformat == FORMAT_PVK) { EVP_PKEY *pk; pk = EVP_PKEY_new(); + if (pk == NULL) + goto end; + EVP_PKEY_set1_DSA(pk, dsa); if (outformat == FORMAT_PVK) { if (pubin) { @@ -256,6 +260,6 @@ int dsa_main(int argc, char **argv) release_engine(e); OPENSSL_free(passin); OPENSSL_free(passout); - return (ret); + return ret; } #endif