Fix s_server -ssl2. Previously this reported "Error setting EC curve"
[oweals/openssl.git] / apps / progs.pl
index af0eaa3bcb0c6b4a01bfa9b0910a79a89002f817..2b1efd8fed33effc1a2dabf845208b6c45e96a94 100644 (file)
@@ -22,6 +22,7 @@ typedef struct {
        const char *name;
        int (*func)(int argc,char *argv[]);
        } FUNCTION;
+DECLARE_LHASH_OF(FUNCTION);
 
 FUNCTION functions[] = {
 EOF
@@ -31,7 +32,7 @@ foreach (@ARGV)
        push(@files,$_);
        $str="\t{FUNC_TYPE_GENERAL,\"$_\",${_}_main},\n";
        if (($_ =~ /^s_/) || ($_ =~ /^ciphers$/))
-               { print "#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))\n${str}#endif\n"; } 
+               { print "#if !defined(OPENSSL_NO_SOCK)\n${str}#endif\n"; } 
        elsif ( ($_ =~ /^speed$/))
                { print "#ifndef OPENSSL_NO_SPEED\n${str}#endif\n"; }
        elsif ( ($_ =~ /^engine$/))
@@ -46,11 +47,17 @@ foreach (@ARGV)
                { 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"; }
+       elsif ( ($_ =~ /^cms$/))
+               { print "#ifndef OPENSSL_NO_CMS\n${str}#endif\n"; }
+       elsif ( ($_ =~ /^ocsp$/))
+               { print "#ifndef OPENSSL_NO_OCSP\n${str}#endif\n"; }
+       elsif ( ($_ =~ /^srp$/))
+               { print "#ifndef OPENSSL_NO_SRP\n${str}#endif\n"; }
        else
                { print $str; }
        }
 
-foreach ("md2","md4","md5","sha","sha1","mdc2","rmd160")
+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";
@@ -63,7 +70,7 @@ foreach (
        "camellia-128-cbc", "camellia-128-ecb",
        "camellia-192-cbc", "camellia-192-ecb",
        "camellia-256-cbc", "camellia-256-ecb",
-       "base64",
+       "base64", "zlib",
        "des", "des3", "desx", "idea", "seed", "rc4", "rc4-40",
        "rc2", "bf", "cast", "rc5",
        "des-ecb", "des-ede",    "des-ede3",
@@ -90,6 +97,7 @@ foreach (
        elsif ($_ =~ /bf/)   { $t="#ifndef OPENSSL_NO_BF\n${t}#endif\n"; }
        elsif ($_ =~ /cast/) { $t="#ifndef OPENSSL_NO_CAST\n${t}#endif\n"; }
        elsif ($_ =~ /rc5/)  { $t="#ifndef OPENSSL_NO_RC5\n${t}#endif\n"; }
+       elsif ($_ =~ /zlib/)  { $t="#ifdef ZLIB\n${t}#endif\n"; }
        print $t;
        }