-#!/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 licenses, (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
-# 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.
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 licenses, (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
- * or in the file LICENSE in the source distribution.
*/
typedef enum FUNC_TYPE {
typedef struct function_st {
FUNC_TYPE type;
const char *name;
- int (*func)(int argc,char *argv[]);
+ int (*func)(int argc, char *argv[]);
const OPTIONS *help;
} FUNCTION;
print "\n";
foreach (@ARGV) {
- printf "extern OPTIONS %s_options[];\n", $_;
+ printf "extern const OPTIONS %s_options[];\n", $_;
}
print "\n#ifdef INCLUDE_FUNCTION_TABLE\n";
pkcs12 => "des",
);
foreach my $cmd (@ARGV) {
- my $str=" { FT_general, \"$cmd\", ${cmd}_main, ${cmd}_options },\n";
+ my $str=" {FT_general, \"$cmd\", ${cmd}_main, ${cmd}_options},\n";
if ($cmd =~ /^s_/) {
print "#ifndef OPENSSL_NO_SOCK\n${str}#endif\n";
} elsif (grep { $cmd eq $_ } @disablables) {
}
my %md_disabler = (
- sha1 => "sha",
- sha224 => "sha",
- sha256 => "sha",
- sha384 => "sha",
- sha512 => "sha",
blake2b512 => "blake2",
blake2s256 => "blake2",
);
"sha1", "sha224", "sha256", "sha384", "sha512",
"mdc2", "rmd160", "blake2b512", "blake2s256"
) {
- my $str = " { FT_md, \"".$cmd."\", dgst_main},\n";
+ my $str = " {FT_md, \"".$cmd."\", dgst_main},\n";
if (grep { $cmd eq $_ } @disablables) {
print "#ifndef OPENSSL_NO_".uc($cmd)."\n${str}#endif\n";
} 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;
}
}
"cast5-cbc","cast5-ecb", "cast5-cfb","cast5-ofb",
"cast-cbc", "rc5-cbc", "rc5-ecb", "rc5-cfb", "rc5-ofb"
) {
- my $str=" { FT_cipher, \"$cmd\", enc_main, enc_options },\n";
+ my $str=" {FT_cipher, \"$cmd\", enc_main, enc_options},\n";
(my $algo= $cmd) =~ s/-.*//g;
if ($cmd eq "zlib") {
print "#ifdef ZLIB\n${str}#endif\n";