X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=apps%2Fpkcs12.c;h=bf22aeb48dd2d23757d457826ee214d783ee0a2b;hp=1a353e169dc0a04e606dbe545a32215bb86fb633;hb=1393722af384cdf310645c598bbd06a3bbaa2f31;hpb=dab2cd68e7cc304c9b1a4e7cee18a98711771a53 diff --git a/apps/pkcs12.c b/apps/pkcs12.c index 1a353e169d..bf22aeb48d 100644 --- a/apps/pkcs12.c +++ b/apps/pkcs12.c @@ -1,7 +1,7 @@ /* - * Copyright 1999-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1999-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 @@ -311,6 +311,13 @@ int pkcs12_main(int argc, char **argv) if (cpass != NULL) { mpass = cpass; noprompt = 1; + if (twopass) { + if (export_cert) + BIO_printf(bio_err, "Option -twopass cannot be used with -passout or -password\n"); + else + BIO_printf(bio_err, "Option -twopass cannot be used with -passin or -password\n"); + goto end; + } } else { cpass = pass; mpass = macpass;