diff options
author | Pauli <paul.dale@oracle.com> | 2020-03-03 11:01:26 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-04-19 10:36:35 +1000 |
commit | cd3572a110ae7ea2e7f1e9be0badafa7679a628a (patch) | |
tree | d030c58a50cdcc67c5cd9ab7ca0f43d8504824be /apps/progs.pl | |
parent | 54affb77c54edfa8159cb773f4b5e9e67054b37e (diff) | |
download | openssl-new-cd3572a110ae7ea2e7f1e9be0badafa7679a628a.tar.gz |
dsaparam: update command line app to use EVP calls
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/11225)
Diffstat (limited to 'apps/progs.pl')
-rw-r--r-- | apps/progs.pl | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/apps/progs.pl b/apps/progs.pl index 03553efb23..e5f0a7f7ac 100644 --- a/apps/progs.pl +++ b/apps/progs.pl @@ -95,15 +95,20 @@ EOF pkcs12 => "des", ); my %cmd_deprecated = ( - rsa => [ "3_0", "pkey", "rsa" ], - genrsa => [ "3_0", "genpkey", "rsa" ], - rsautl => [ "3_0", "pkeyutl", "rsa" ], - dhparam => [ "3_0", "pkeyparam", "dh" ], - dsaparam => [ "3_0", "pkeyparam", "dsa" ], - dsa => [ "3_0", "pkey", "dsa" ], - gendsa => [ "3_0", "genpkey", "dsa" ], - ec => [ "3_0", "pkey", "ec" ], - ecparam => [ "3_0", "pkeyparam", "ec" ], +# The format of this table is: +# [0] = 0/1, 1 means deprecated and gone, 0 is deprecated but still present +# [1] = alternative command to use instead +# [2] = deprecented in this version +# [3] = preprocessor conditional for exclusing irrespective of deprecation + rsa => [ 0, "pkey", "3_0", "rsa" ], + genrsa => [ 1, "genpkey", "3_0", "rsa" ], + rsautl => [ 0, "pkeyutl", "3_0", "rsa" ], + dhparam => [ 1, "pkeyparam", "3_0", "dh" ], + dsaparam => [ 1, "pkeyparam", "3_0", "dsa" ], + dsa => [ 0, "pkey", "3_0", "dsa" ], + gendsa => [ 1, "genpkey", "3_0", "dsa" ], + ec => [ 0, "pkey", "3_0", "ec" ], + ecparam => [ 0, "pkeyparam", "3_0", "ec" ], ); print "FUNCTION functions[] = {\n"; @@ -115,10 +120,15 @@ EOF } elsif (my $deprecated = $cmd_deprecated{$cmd}) { my @dep = @{$deprecated}; print "#if "; - if ($dep[2]) { - print "!defined(OPENSSL_NO_" . uc($dep[2]) . ") && "; + if ($dep[0]) { + print "!defined(OPENSSL_NO_DEPRECATED_" . $dep[2] . ")"; + } + if ($dep[3]) { + if ($dep[0]) { + print " && "; + } + print "!defined(OPENSSL_NO_" . uc($dep[3]) . ")"; } - print "!defined(OPENSSL_NO_DEPRECATED_" . $dep[0] . ")"; my $dalt = "\"" . $dep[1] . "\""; $str =~ s/NULL/$dalt/; print "\n${str}#endif\n"; |