projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
OPENSSL_NO_xxx cleanup: SHA
[openssl.git]
/
apps
/
progs.pl
diff --git
a/apps/progs.pl
b/apps/progs.pl
index 8695742f28fc3a3e23c08aed59d6b0ca4e993554..09dd00b7ee282fd6b1f63d04270ce3d40081d846 100644
(file)
--- a/
apps/progs.pl
+++ b/
apps/progs.pl
@@
-6,22
+6,22
@@
print "/* automatically generated by progs.pl for openssl.c */\n\n";
grep(s/^asn1pars$/asn1parse/,@ARGV);
foreach (@ARGV)
grep(s/^asn1pars$/asn1parse/,@ARGV);
foreach (@ARGV)
- { printf "extern int %s_main(int argc,char *argv[]);\n",$_; }
+ { printf "extern int %s_main(int argc,
char *argv[]);\n",$_; }
print <<'EOF';
print <<'EOF';
-#define FUNC_TYPE_GENERAL 1
-#define FUNC_TYPE_MD 2
-#define FUNC_TYPE_CIPHER 3
-#define FUNC_TYPE_PKEY 4
-#define FUNC_TYPE_MD_ALG 5
-#define FUNC_TYPE_CIPHER_ALG 6
+#define FUNC_TYPE_GENERAL
1
+#define FUNC_TYPE_MD
2
+#define FUNC_TYPE_CIPHER
3
+#define FUNC_TYPE_PKEY
4
+#define FUNC_TYPE_MD_ALG
5
+#define FUNC_TYPE_CIPHER_ALG
6
typedef struct {
typedef struct {
-
int type;
-
const char *name;
-
int (*func)(int argc,
char *argv[]);
-
} FUNCTION;
+ int type;
+ const char *name;
+
int (*func) (int argc,
char *argv[]);
+} FUNCTION;
DECLARE_LHASH_OF(FUNCTION);
FUNCTION functions[] = {
DECLARE_LHASH_OF(FUNCTION);
FUNCTION functions[] = {
@@
-30,7
+30,7
@@
EOF
foreach (@ARGV)
{
push(@files,$_);
foreach (@ARGV)
{
push(@files,$_);
- $str="
\t{FUNC_TYPE_GENERAL,\"$_\",
${_}_main},\n";
+ $str="
{FUNC_TYPE_GENERAL, \"$_\",
${_}_main},\n";
if (($_ =~ /^s_/) || ($_ =~ /^ciphers$/))
{ print "#if !defined(OPENSSL_NO_SOCK)\n${str}#endif\n"; }
elsif ( ($_ =~ /^engine$/))
if (($_ =~ /^s_/) || ($_ =~ /^ciphers$/))
{ print "#if !defined(OPENSSL_NO_SOCK)\n${str}#endif\n"; }
elsif ( ($_ =~ /^engine$/))
@@
-44,7
+44,7
@@
foreach (@ARGV)
elsif ( ($_ =~ /^dh$/) || ($_ =~ /^gendh$/) || ($_ =~ /^dhparam$/))
{ print "#ifndef OPENSSL_NO_DH\n${str}#endif\n"; }
elsif ( ($_ =~ /^pkcs12$/))
elsif ( ($_ =~ /^dh$/) || ($_ =~ /^gendh$/) || ($_ =~ /^dhparam$/))
{ print "#ifndef OPENSSL_NO_DH\n${str}#endif\n"; }
elsif ( ($_ =~ /^pkcs12$/))
- { print "#if !defined(OPENSSL_NO_DES)
&& !defined(OPENSSL_NO_SHA1)
\n${str}#endif\n"; }
+ { print "#if !defined(OPENSSL_NO_DES)\n${str}#endif\n"; }
elsif ( ($_ =~ /^cms$/))
{ print "#ifndef OPENSSL_NO_CMS\n${str}#endif\n"; }
elsif ( ($_ =~ /^ocsp$/))
elsif ( ($_ =~ /^cms$/))
{ print "#ifndef OPENSSL_NO_CMS\n${str}#endif\n"; }
elsif ( ($_ =~ /^ocsp$/))
@@
-58,7
+58,9
@@
foreach (@ARGV)
foreach ("md2","md4","md5","sha","sha1","mdc2","rmd160","sha224","sha256","sha384","sha512")
{
push(@files,$_);
foreach ("md2","md4","md5","sha","sha1","mdc2","rmd160","sha224","sha256","sha384","sha512")
{
push(@files,$_);
- printf "#ifndef OPENSSL_NO_".uc($_)."\n\t{FUNC_TYPE_MD,\"".$_."\",dgst_main},\n#endif\n";
+ printf "#ifndef OPENSSL_NO_".uc($_)."\n" if ! /sha/;
+ printf " {FUNC_TYPE_MD, \"".$_."\", dgst_main},\n";
+ printf "#endif\n" if ! /sha/;
}
foreach (
}
foreach (
@@
-84,7
+86,7
@@
foreach (
{
push(@files,$_);
{
push(@files,$_);
- $t=sprintf("
\t{FUNC_TYPE_CIPHER,\"%s\",enc_main},\n",
$_);
+ $t=sprintf("
{FUNC_TYPE_CIPHER, \"%s\", enc_main},\n",
$_);
if ($_ =~ /des/) { $t="#ifndef OPENSSL_NO_DES\n${t}#endif\n"; }
elsif ($_ =~ /aes/) { $t="#ifndef OPENSSL_NO_AES\n${t}#endif\n"; }
elsif ($_ =~ /camellia/) { $t="#ifndef OPENSSL_NO_CAMELLIA\n${t}#endif\n"; }
if ($_ =~ /des/) { $t="#ifndef OPENSSL_NO_DES\n${t}#endif\n"; }
elsif ($_ =~ /aes/) { $t="#ifndef OPENSSL_NO_AES\n${t}#endif\n"; }
elsif ($_ =~ /camellia/) { $t="#ifndef OPENSSL_NO_CAMELLIA\n${t}#endif\n"; }
@@
-99,4
+101,4
@@
foreach (
print $t;
}
print $t;
}
-print "
\t{0,NULL,NULL}\n\t
};\n";
+print "
{0, NULL, NULL}\n
};\n";