summaryrefslogtreecommitdiffstats
path: root/apps/openssl.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/openssl.c')
-rw-r--r--apps/openssl.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/apps/openssl.c b/apps/openssl.c
index 558f662e14..e3197daab9 100644
--- a/apps/openssl.c
+++ b/apps/openssl.c
@@ -47,12 +47,15 @@ BIO *bio_in = NULL;
BIO *bio_out = NULL;
BIO *bio_err = NULL;
-static void warn_deprecated(const char *pname,
- const char *deprecated_alternative)
+static void warn_deprecated(const FUNCTION *fp)
{
- BIO_printf(bio_err, "The command %s is deprecated.", pname);
- if (strcmp(deprecated_alternative, DEPRECATED_NO_ALTERNATIVE) != 0)
- BIO_printf(bio_err, " Use '%s' instead.", deprecated_alternative);
+ if (fp->deprecated_version != NULL)
+ BIO_printf(bio_err, "The command %s was deprecated in version %s.",
+ fp->name, fp->deprecated_version);
+ else
+ BIO_printf(bio_err, "The command %s is deprecated.", fp->name);
+ if (strcmp(fp->deprecated_alternative, DEPRECATED_NO_ALTERNATIVE) != 0)
+ BIO_printf(bio_err, " Use '%s' instead.", fp->deprecated_alternative);
BIO_printf(bio_err, "\n");
}
@@ -287,7 +290,7 @@ int main(int argc, char *argv[])
if (fp != NULL) {
argv[0] = pname;
if (fp->deprecated_alternative != NULL)
- warn_deprecated(pname, fp->deprecated_alternative);
+ warn_deprecated(fp);
ret = fp->func(argc, argv);
goto end;
}
@@ -483,7 +486,7 @@ static int do_cmd(LHASH_OF(FUNCTION) *prog, int argc, char *argv[])
}
if (fp != NULL) {
if (fp->deprecated_alternative != NULL)
- warn_deprecated(fp->name, fp->deprecated_alternative);
+ warn_deprecated(fp);
return fp->func(argc, argv);
}
if ((strncmp(argv[0], "no-", 3)) == 0) {