projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
print out MAC algorithm
[openssl.git]
/
apps
/
progs.pl
diff --git
a/apps/progs.pl
b/apps/progs.pl
index 50b6cee53f2c2d08548f251d8cd9c7137499f3bc..3ec16d54cb818f459573ab45bac5296452f4c871 100644
(file)
--- a/
apps/progs.pl
+++ b/
apps/progs.pl
@@
-1,12
+1,10
@@
-#!/usr/bin/perl
-
-# Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
+#! /usr/bin/env perl
+# Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
#
#
-# Licensed under the OpenSSL license
s, (the "License");
-#
you may not use this file except in compliance with the License.
-#
You may obtain a copy of the License
at
+# Licensed under the OpenSSL license
(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
# https://www.openssl.org/source/license.html
-# or in the file LICENSE in the source distribution.
# Generate progs.h file by looking for command mains in list of C files
# passed on the command line.
# Generate progs.h file by looking for command mains in list of C files
# passed on the command line.
@@
-31,14
+29,15
@@
foreach my $filename (@ARGV) {
print <<'EOF';
/*
print <<'EOF';
/*
- * Automatically generated by progs.pl for openssl.c
- * Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * WARNING: do not edit!
+ * Generated by apps/progs.pl
+ *
+ * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
*
*
- * Licensed under the OpenSSL license
s, (the "License");
- *
you may not use this file except in compliance with the License.
- *
You may obtain a copy of the License
at
+ * Licensed under the OpenSSL license
(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
* https://www.openssl.org/source/license.html
- * or in the file LICENSE in the source distribution.
*/
typedef enum FUNC_TYPE {
*/
typedef enum FUNC_TYPE {
@@
-67,6
+66,8
@@
foreach (@ARGV) {
printf "extern OPTIONS %s_options[];\n", $_;
}
printf "extern OPTIONS %s_options[];\n", $_;
}
+print "\n#ifdef INCLUDE_FUNCTION_TABLE\n";
+print "static FUNCTION functions[] = {\n";
my %cmd_disabler = (
ciphers => "sock",
genrsa => "rsa",
my %cmd_disabler = (
ciphers => "sock",
genrsa => "rsa",
@@
-78,7
+79,6
@@
my %cmd_disabler = (
ecparam => "ec",
pkcs12 => "des",
);
ecparam => "ec",
pkcs12 => "des",
);
-print "\nstatic FUNCTION functions[] = {\n";
foreach my $cmd (@ARGV) {
my $str=" { FT_general, \"$cmd\", ${cmd}_main, ${cmd}_options },\n";
if ($cmd =~ /^s_/) {
foreach my $cmd (@ARGV) {
my $str=" { FT_general, \"$cmd\", ${cmd}_main, ${cmd}_options },\n";
if ($cmd =~ /^s_/) {
@@
-93,17
+93,12
@@
foreach my $cmd (@ARGV) {
}
my %md_disabler = (
}
my %md_disabler = (
- sha1 => "sha",
- sha224 => "sha",
- sha256 => "sha",
- sha384 => "sha",
- sha512 => "sha",
blake2b512 => "blake2",
blake2s256 => "blake2",
);
foreach my $cmd (
"md2", "md4", "md5",
blake2b512 => "blake2",
blake2s256 => "blake2",
);
foreach my $cmd (
"md2", "md4", "md5",
- "
md_ghost94
",
+ "
gost
",
"sha1", "sha224", "sha256", "sha384", "sha512",
"mdc2", "rmd160", "blake2b512", "blake2s256"
) {
"sha1", "sha224", "sha256", "sha384", "sha512",
"mdc2", "rmd160", "blake2b512", "blake2s256"
) {
@@
-113,7
+108,7
@@
foreach my $cmd (
} elsif (my $disabler = $md_disabler{$cmd}) {
print "#ifndef OPENSSL_NO_".uc($disabler)."\n${str}#endif\n";
} else {
} elsif (my $disabler = $md_disabler{$cmd}) {
print "#ifndef OPENSSL_NO_".uc($disabler)."\n${str}#endif\n";
} else {
- print
"#ifndef OPENSSL_NO_".uc($cmd)."\n${str}#endif\n"
;
+ print
$str
;
}
}
}
}
@@
-157,3
+152,4
@@
foreach my $cmd (
}
print " { 0, NULL, NULL}\n};\n";
}
print " { 0, NULL, NULL}\n};\n";
+print "#endif\n";