X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=apps%2Fprogs.pl;h=57671405dda007dff588246e67e50b6f23d7d443;hp=033e2e223b50fcf80f9af40c93c23b0c66e185db;hb=dad886806f8bbf7fa0e82776e2ea8a23733b9a63;hpb=aa74c2ec016e1056f3df22507832644e6e6ac43c diff --git a/apps/progs.pl b/apps/progs.pl index 033e2e223b..57671405dd 100644 --- a/apps/progs.pl +++ b/apps/progs.pl @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 1995-2016 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 # this file except in compliance with the License. You can obtain a copy @@ -17,16 +17,18 @@ use configdata qw/@disablables %unified_info/; my %commands = (); my $cmdre = qr/^\s*int\s+([a-z_][a-z0-9_]*)_main\(\s*int\s+argc\s*,/; my $apps_openssl = shift @ARGV; +my $YEAR = [localtime()]->[5] + 1900; # because the program apps/openssl has object files as sources, and # they then have the corresponding C files as source, we need to chain # the lookups in %unified_info my @openssl_source = map { @{$unified_info{sources}->{$_}} } + grep { /\.o$/ } @{$unified_info{sources}->{$apps_openssl}}; foreach my $filename (@openssl_source) { - open F, $filename or die "Coudn't open $_: $!\n"; + open F, $filename or die "Couldn't open $filename: $!\n"; foreach ( grep /$cmdre/, ) { my @foo = /$cmdre/; $commands{$1} = 1; @@ -36,12 +38,12 @@ foreach my $filename (@openssl_source) { @ARGV = sort keys %commands; -print <<'EOF'; +print <<"EOF"; /* * WARNING: do not edit! * Generated by apps/progs.pl * - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-$YEAR The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -107,10 +109,14 @@ my %md_disabler = ( blake2s256 => "blake2", ); foreach my $cmd ( - "md2", "md4", "md5", - "gost", - "sha1", "sha224", "sha256", "sha384", "sha512", - "mdc2", "rmd160", "blake2b512", "blake2s256" + "md2", "md4", "md5", + "gost", + "sha1", "sha224", "sha256", "sha384", + "sha512", "sha512-224", "sha512-256", + "sha3-224", "sha3-256", "sha3-384", "sha3-512", + "shake128", "shake256", + "mdc2", "rmd160", "blake2b512", "blake2s256", + "sm3" ) { my $str = " {FT_md, \"$cmd\", dgst_main},\n"; if (grep { $cmd eq $_ } @disablables) { @@ -155,7 +161,8 @@ foreach my $cmd ( "rc2-cbc", "rc2-ecb", "rc2-cfb","rc2-ofb", "rc2-64-cbc", "rc2-40-cbc", "bf-cbc", "bf-ecb", "bf-cfb", "bf-ofb", "cast5-cbc","cast5-ecb", "cast5-cfb","cast5-ofb", - "cast-cbc", "rc5-cbc", "rc5-ecb", "rc5-cfb", "rc5-ofb" + "cast-cbc", "rc5-cbc", "rc5-ecb", "rc5-cfb", "rc5-ofb", + "sm4-cbc", "sm4-ecb", "sm4-cfb", "sm4-ofb", "sm4-ctr" ) { my $str = " {FT_cipher, \"$cmd\", enc_main, enc_options},\n"; (my $algo = $cmd) =~ s/-.*//g;