X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=apps%2Fversion.c;h=7185e9edcd1ddba29af5d7947132e471c21d022d;hp=2b06f9221b63b8e657be0f60eee23695f84dd05f;hb=HEAD;hpb=5388f9862d9aaf3c7cf7a70c1e36e7e983c26cfc diff --git a/apps/version.c b/apps/version.c index 2b06f9221b..7185e9edcd 100644 --- a/apps/version.c +++ b/apps/version.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 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 @@ -15,24 +15,9 @@ #include #include #include -#ifndef OPENSSL_NO_MD2 -# include -#endif -#ifndef OPENSSL_NO_RC4 -# include -#endif -#ifndef OPENSSL_NO_DES -# include -#endif -#ifndef OPENSSL_NO_IDEA -# include -#endif -#ifndef OPENSSL_NO_BF -# include -#endif typedef enum OPTION_choice { - OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, + OPT_COMMON, OPT_B, OPT_D, OPT_E, OPT_M, OPT_F, OPT_O, OPT_P, OPT_V, OPT_A, OPT_R, OPT_C } OPTION_CHOICE; @@ -112,10 +97,11 @@ opthelp: break; } } - if (opt_num_rest() != 0) { - BIO_printf(bio_err, "Extra parameters given.\n"); + + /* No extra arguments. */ + if (!opt_check_rest_arg(NULL)) goto opthelp; - } + if (!dirty) version = 1; @@ -129,21 +115,6 @@ opthelp: if (options) { printf("options: "); printf(" %s", BN_options()); -#ifndef OPENSSL_NO_MD2 - printf(" %s", MD2_options()); -#endif -#ifndef OPENSSL_NO_RC4 - printf(" %s", RC4_options()); -#endif -#ifndef OPENSSL_NO_DES - printf(" %s", DES_options()); -#endif -#ifndef OPENSSL_NO_IDEA - printf(" %s", IDEA_options()); -#endif -#ifndef OPENSSL_NO_BF - printf(" %s", BF_options()); -#endif printf("\n"); } if (cflags) @@ -164,3 +135,16 @@ opthelp: end: return ret; } + + +#if defined(__TANDEM) && defined(OPENSSL_VPROC) +/* + * Define a VPROC function for the openssl program. + * This is used by platform version identification tools. + * Do not inline this procedure or make it static. + */ +# define OPENSSL_VPROC_STRING_(x) x##_OPENSSL +# define OPENSSL_VPROC_STRING(x) OPENSSL_VPROC_STRING_(x) +# define OPENSSL_VPROC_FUNC OPENSSL_VPROC_STRING(OPENSSL_VPROC) +void OPENSSL_VPROC_FUNC(void) {} +#endif