diff options
Diffstat (limited to 'src/lib/libcrypto/util/mkdef.pl')
-rw-r--r-- | src/lib/libcrypto/util/mkdef.pl | 76 |
1 files changed, 51 insertions, 25 deletions
diff --git a/src/lib/libcrypto/util/mkdef.pl b/src/lib/libcrypto/util/mkdef.pl index 5ae9ebb619..a4a17e3ae9 100644 --- a/src/lib/libcrypto/util/mkdef.pl +++ b/src/lib/libcrypto/util/mkdef.pl | |||
@@ -69,7 +69,7 @@ my $do_ctestall = 0; | |||
69 | my $do_checkexist = 0; | 69 | my $do_checkexist = 0; |
70 | 70 | ||
71 | my $VMSVAX=0; | 71 | my $VMSVAX=0; |
72 | my $VMSAlpha=0; | 72 | my $VMSNonVAX=0; |
73 | my $VMS=0; | 73 | my $VMS=0; |
74 | my $W32=0; | 74 | my $W32=0; |
75 | my $W16=0; | 75 | my $W16=0; |
@@ -79,12 +79,13 @@ my $OS2=0; | |||
79 | my $safe_stack_def = 0; | 79 | my $safe_stack_def = 0; |
80 | 80 | ||
81 | my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT", | 81 | my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT", |
82 | "EXPORT_VAR_AS_FUNCTION", "ZLIB", "OPENSSL_FIPS"); | 82 | "EXPORT_VAR_AS_FUNCTION", "ZLIB" ); |
83 | my @known_ossl_platforms = ( "VMS", "WIN16", "WIN32", "WINNT", "OS2" ); | 83 | my @known_ossl_platforms = ( "VMS", "WIN16", "WIN32", "WINNT", "OS2" ); |
84 | my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF", | 84 | my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF", |
85 | "CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1", | 85 | "CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1", |
86 | "SHA256", "SHA512", "RIPEMD", | 86 | "SHA256", "SHA512", "RIPEMD", |
87 | "MDC2", "RSA", "DSA", "DH", "EC", "ECDH", "ECDSA", "HMAC", "AES", "CAMELLIA", "SEED", | 87 | "MDC2", "WHIRLPOOL", "RSA", "DSA", "DH", "EC", "ECDH", "ECDSA", |
88 | "HMAC", "AES", "CAMELLIA", "SEED", "GOST", | ||
88 | # Envelope "algorithms" | 89 | # Envelope "algorithms" |
89 | "EVP", "X509", "ASN1_TYPEDEFS", | 90 | "EVP", "X509", "ASN1_TYPEDEFS", |
90 | # Helper "algorithms" | 91 | # Helper "algorithms" |
@@ -94,14 +95,16 @@ my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF", | |||
94 | "FP_API", "STDIO", "SOCK", "KRB5", "DGRAM", | 95 | "FP_API", "STDIO", "SOCK", "KRB5", "DGRAM", |
95 | # Engines | 96 | # Engines |
96 | "STATIC_ENGINE", "ENGINE", "HW", "GMP", | 97 | "STATIC_ENGINE", "ENGINE", "HW", "GMP", |
97 | # RFC3779 support | 98 | # RFC3779 |
98 | "RFC3779", | 99 | "RFC3779", |
99 | # TLS extension support | 100 | # TLS |
100 | "TLSEXT", | 101 | "TLSEXT", "PSK", |
101 | # CMS | 102 | # CMS |
102 | "CMS", | 103 | "CMS", |
103 | # CryptoAPI Engine | 104 | # CryptoAPI Engine |
104 | "CAPIENG", | 105 | "CAPIENG", |
106 | # SSL v2 | ||
107 | "SSL2", | ||
105 | # JPAKE | 108 | # JPAKE |
106 | "JPAKE", | 109 | "JPAKE", |
107 | # Deprecated functions | 110 | # Deprecated functions |
@@ -118,14 +121,15 @@ close(IN); | |||
118 | # defined with ifndef(NO_XXX) are not included in the .def file, and everything | 121 | # defined with ifndef(NO_XXX) are not included in the .def file, and everything |
119 | # in directory xxx is ignored. | 122 | # in directory xxx is ignored. |
120 | my $no_rc2; my $no_rc4; my $no_rc5; my $no_idea; my $no_des; my $no_bf; | 123 | my $no_rc2; my $no_rc4; my $no_rc5; my $no_idea; my $no_des; my $no_bf; |
121 | my $no_cast; | 124 | my $no_cast; my $no_whirlpool; my $no_camellia; my $no_seed; |
122 | my $no_md2; my $no_md4; my $no_md5; my $no_sha; my $no_ripemd; my $no_mdc2; | 125 | my $no_md2; my $no_md4; my $no_md5; my $no_sha; my $no_ripemd; my $no_mdc2; |
123 | my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; my $no_aes; my $no_krb5; | 126 | my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; my $no_aes; my $no_krb5; |
124 | my $no_ec; my $no_ecdsa; my $no_ecdh; my $no_engine; my $no_hw; my $no_camellia; | 127 | my $no_ec; my $no_ecdsa; my $no_ecdh; my $no_engine; my $no_hw; |
125 | my $no_seed; | 128 | my $no_fp_api; my $no_static_engine=1; my $no_gmp; my $no_deprecated; |
126 | my $no_fp_api; my $no_static_engine; my $no_gmp; my $no_deprecated; | 129 | my $no_rfc3779; my $no_psk; my $no_tlsext; my $no_cms; my $no_capieng; |
127 | my $no_rfc3779; my $no_tlsext; my $no_cms; my $no_capieng; my $no_jpake; | 130 | my $no_jpake; my $no_ssl2; |
128 | my $fips; | 131 | |
132 | my $zlib; | ||
129 | 133 | ||
130 | 134 | ||
131 | foreach (@ARGV, split(/ /, $options)) | 135 | foreach (@ARGV, split(/ /, $options)) |
@@ -141,17 +145,15 @@ foreach (@ARGV, split(/ /, $options)) | |||
141 | $VMS=1; | 145 | $VMS=1; |
142 | $VMSVAX=1; | 146 | $VMSVAX=1; |
143 | } | 147 | } |
144 | if ($_ eq "VMS-Alpha") { | 148 | if ($_ eq "VMS-NonVAX") { |
145 | $VMS=1; | 149 | $VMS=1; |
146 | $VMSAlpha=1; | 150 | $VMSNonVAX=1; |
147 | } | 151 | } |
148 | $VMS=1 if $_ eq "VMS"; | 152 | $VMS=1 if $_ eq "VMS"; |
149 | $OS2=1 if $_ eq "OS2"; | 153 | $OS2=1 if $_ eq "OS2"; |
150 | $fips=1 if /^fips/; | 154 | if ($_ eq "zlib" || $_ eq "enable-zlib" || $_ eq "zlib-dynamic" |
151 | 155 | || $_ eq "enable-zlib-dynamic") { | |
152 | if ($_ eq "zlib" || $_ eq "zlib-dynamic" | 156 | $zlib = 1; |
153 | || $_ eq "enable-zlib-dynamic") { | ||
154 | $zlib = 1; | ||
155 | } | 157 | } |
156 | 158 | ||
157 | $do_ssl=1 if $_ eq "ssleay"; | 159 | $do_ssl=1 if $_ eq "ssleay"; |
@@ -180,6 +182,7 @@ foreach (@ARGV, split(/ /, $options)) | |||
180 | elsif (/^no-des$/) { $no_des=1; $no_mdc2=1; } | 182 | elsif (/^no-des$/) { $no_des=1; $no_mdc2=1; } |
181 | elsif (/^no-bf$/) { $no_bf=1; } | 183 | elsif (/^no-bf$/) { $no_bf=1; } |
182 | elsif (/^no-cast$/) { $no_cast=1; } | 184 | elsif (/^no-cast$/) { $no_cast=1; } |
185 | elsif (/^no-whirlpool$/) { $no_whirlpool=1; } | ||
183 | elsif (/^no-md2$/) { $no_md2=1; } | 186 | elsif (/^no-md2$/) { $no_md2=1; } |
184 | elsif (/^no-md4$/) { $no_md4=1; } | 187 | elsif (/^no-md4$/) { $no_md4=1; } |
185 | elsif (/^no-md5$/) { $no_md5=1; } | 188 | elsif (/^no-md5$/) { $no_md5=1; } |
@@ -212,6 +215,7 @@ foreach (@ARGV, split(/ /, $options)) | |||
212 | elsif (/^no-rfc3779$/) { $no_rfc3779=1; } | 215 | elsif (/^no-rfc3779$/) { $no_rfc3779=1; } |
213 | elsif (/^no-tlsext$/) { $no_tlsext=1; } | 216 | elsif (/^no-tlsext$/) { $no_tlsext=1; } |
214 | elsif (/^no-cms$/) { $no_cms=1; } | 217 | elsif (/^no-cms$/) { $no_cms=1; } |
218 | elsif (/^no-ssl2$/) { $no_ssl2=1; } | ||
215 | elsif (/^no-capieng$/) { $no_capieng=1; } | 219 | elsif (/^no-capieng$/) { $no_capieng=1; } |
216 | elsif (/^no-jpake$/) { $no_jpake=1; } | 220 | elsif (/^no-jpake$/) { $no_jpake=1; } |
217 | } | 221 | } |
@@ -260,6 +264,7 @@ $crypto.=" crypto/rc5/rc5.h" ; # unless $no_rc5; | |||
260 | $crypto.=" crypto/rc2/rc2.h" ; # unless $no_rc2; | 264 | $crypto.=" crypto/rc2/rc2.h" ; # unless $no_rc2; |
261 | $crypto.=" crypto/bf/blowfish.h" ; # unless $no_bf; | 265 | $crypto.=" crypto/bf/blowfish.h" ; # unless $no_bf; |
262 | $crypto.=" crypto/cast/cast.h" ; # unless $no_cast; | 266 | $crypto.=" crypto/cast/cast.h" ; # unless $no_cast; |
267 | $crypto.=" crypto/whrlpool/whrlpool.h" ; | ||
263 | $crypto.=" crypto/md2/md2.h" ; # unless $no_md2; | 268 | $crypto.=" crypto/md2/md2.h" ; # unless $no_md2; |
264 | $crypto.=" crypto/md4/md4.h" ; # unless $no_md4; | 269 | $crypto.=" crypto/md4/md4.h" ; # unless $no_md4; |
265 | $crypto.=" crypto/md5/md5.h" ; # unless $no_md5; | 270 | $crypto.=" crypto/md5/md5.h" ; # unless $no_md5; |
@@ -301,17 +306,16 @@ $crypto.=" crypto/pkcs12/pkcs12.h"; | |||
301 | $crypto.=" crypto/x509/x509.h"; | 306 | $crypto.=" crypto/x509/x509.h"; |
302 | $crypto.=" crypto/x509/x509_vfy.h"; | 307 | $crypto.=" crypto/x509/x509_vfy.h"; |
303 | $crypto.=" crypto/x509v3/x509v3.h"; | 308 | $crypto.=" crypto/x509v3/x509v3.h"; |
309 | $crypto.=" crypto/ts/ts.h"; | ||
304 | $crypto.=" crypto/rand/rand.h"; | 310 | $crypto.=" crypto/rand/rand.h"; |
305 | $crypto.=" crypto/comp/comp.h" ; # unless $no_comp; | 311 | $crypto.=" crypto/comp/comp.h" ; # unless $no_comp; |
306 | $crypto.=" crypto/ocsp/ocsp.h"; | 312 | $crypto.=" crypto/ocsp/ocsp.h"; |
307 | $crypto.=" crypto/ui/ui.h crypto/ui/ui_compat.h"; | 313 | $crypto.=" crypto/ui/ui.h crypto/ui/ui_compat.h"; |
308 | $crypto.=" crypto/krb5/krb5_asn.h"; | 314 | $crypto.=" crypto/krb5/krb5_asn.h"; |
309 | $crypto.=" crypto/tmdiff.h"; | 315 | #$crypto.=" crypto/store/store.h"; |
310 | $crypto.=" crypto/store/store.h"; | ||
311 | $crypto.=" crypto/pqueue/pqueue.h"; | 316 | $crypto.=" crypto/pqueue/pqueue.h"; |
312 | $crypto.=" crypto/cms/cms.h"; | 317 | $crypto.=" crypto/cms/cms.h"; |
313 | $crypto.=" crypto/jpake/jpake.h"; | 318 | $crypto.=" crypto/jpake/jpake.h"; |
314 | $crypto.=" fips/fips.h fips/rand/fips_rand.h"; | ||
315 | 319 | ||
316 | my $symhacks="crypto/symhacks.h"; | 320 | my $symhacks="crypto/symhacks.h"; |
317 | 321 | ||
@@ -885,6 +889,7 @@ sub do_defs | |||
885 | s/\{\}/\(\)/gs; | 889 | s/\{\}/\(\)/gs; |
886 | 890 | ||
887 | s/STACK_OF\(\)/void/gs; | 891 | s/STACK_OF\(\)/void/gs; |
892 | s/LHASH_OF\(\)/void/gs; | ||
888 | 893 | ||
889 | print STDERR "DEBUG: \$_ = \"$_\"\n" if $debug; | 894 | print STDERR "DEBUG: \$_ = \"$_\"\n" if $debug; |
890 | if (/^\#INFO:([^:]*):(.*)$/) { | 895 | if (/^\#INFO:([^:]*):(.*)$/) { |
@@ -961,6 +966,25 @@ sub do_defs | |||
961 | $platform{"PEM_write_NS_CERT_SEQ"} = "VMS"; | 966 | $platform{"PEM_write_NS_CERT_SEQ"} = "VMS"; |
962 | $platform{"PEM_read_P8_PRIV_KEY_INFO"} = "VMS"; | 967 | $platform{"PEM_read_P8_PRIV_KEY_INFO"} = "VMS"; |
963 | $platform{"PEM_write_P8_PRIV_KEY_INFO"} = "VMS"; | 968 | $platform{"PEM_write_P8_PRIV_KEY_INFO"} = "VMS"; |
969 | $platform{"EVP_sha384"} = "!VMSVAX"; | ||
970 | $platform{"EVP_sha512"} = "!VMSVAX"; | ||
971 | $platform{"SHA384_Init"} = "!VMSVAX"; | ||
972 | $platform{"SHA384_Transform"} = "!VMSVAX"; | ||
973 | $platform{"SHA384_Update"} = "!VMSVAX"; | ||
974 | $platform{"SHA384_Final"} = "!VMSVAX"; | ||
975 | $platform{"SHA384"} = "!VMSVAX"; | ||
976 | $platform{"SHA512_Init"} = "!VMSVAX"; | ||
977 | $platform{"SHA512_Transform"} = "!VMSVAX"; | ||
978 | $platform{"SHA512_Update"} = "!VMSVAX"; | ||
979 | $platform{"SHA512_Final"} = "!VMSVAX"; | ||
980 | $platform{"SHA512"} = "!VMSVAX"; | ||
981 | $platform{"WHIRLPOOL_Init"} = "!VMSVAX"; | ||
982 | $platform{"WHIRLPOOL"} = "!VMSVAX"; | ||
983 | $platform{"WHIRLPOOL_BitUpdate"} = "!VMSVAX"; | ||
984 | $platform{"EVP_whirlpool"} = "!VMSVAX"; | ||
985 | $platform{"WHIRLPOOL_Final"} = "!VMSVAX"; | ||
986 | $platform{"WHIRLPOOL_Update"} = "!VMSVAX"; | ||
987 | |||
964 | 988 | ||
965 | # Info we know about | 989 | # Info we know about |
966 | 990 | ||
@@ -1085,6 +1109,8 @@ sub is_valid | |||
1085 | 1109 | ||
1086 | if ($platforms) { | 1110 | if ($platforms) { |
1087 | # platforms | 1111 | # platforms |
1112 | if ($keyword eq "VMSVAX" && $VMSVAX) { return 1; } | ||
1113 | if ($keyword eq "VMSNonVAX" && $VMSNonVAX) { return 1; } | ||
1088 | if ($keyword eq "VMS" && $VMS) { return 1; } | 1114 | if ($keyword eq "VMS" && $VMS) { return 1; } |
1089 | if ($keyword eq "WIN32" && $W32) { return 1; } | 1115 | if ($keyword eq "WIN32" && $W32) { return 1; } |
1090 | if ($keyword eq "WIN16" && $W16) { return 1; } | 1116 | if ($keyword eq "WIN16" && $W16) { return 1; } |
@@ -1097,9 +1123,6 @@ sub is_valid | |||
1097 | if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX || $W32 || $W16)) { | 1123 | if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX || $W32 || $W16)) { |
1098 | return 1; | 1124 | return 1; |
1099 | } | 1125 | } |
1100 | if ($keyword eq "OPENSSL_FIPS" && $fips) { | ||
1101 | return 1; | ||
1102 | } | ||
1103 | if ($keyword eq "ZLIB" && $zlib) { return 1; } | 1126 | if ($keyword eq "ZLIB" && $zlib) { return 1; } |
1104 | return 0; | 1127 | return 0; |
1105 | } else { | 1128 | } else { |
@@ -1117,6 +1140,7 @@ sub is_valid | |||
1117 | if ($keyword eq "SHA" && $no_sha) { return 0; } | 1140 | if ($keyword eq "SHA" && $no_sha) { return 0; } |
1118 | if ($keyword eq "RIPEMD" && $no_ripemd) { return 0; } | 1141 | if ($keyword eq "RIPEMD" && $no_ripemd) { return 0; } |
1119 | if ($keyword eq "MDC2" && $no_mdc2) { return 0; } | 1142 | if ($keyword eq "MDC2" && $no_mdc2) { return 0; } |
1143 | if ($keyword eq "WHIRLPOOL" && $no_whirlpool) { return 0; } | ||
1120 | if ($keyword eq "RSA" && $no_rsa) { return 0; } | 1144 | if ($keyword eq "RSA" && $no_rsa) { return 0; } |
1121 | if ($keyword eq "DSA" && $no_dsa) { return 0; } | 1145 | if ($keyword eq "DSA" && $no_dsa) { return 0; } |
1122 | if ($keyword eq "DH" && $no_dh) { return 0; } | 1146 | if ($keyword eq "DH" && $no_dh) { return 0; } |
@@ -1143,7 +1167,9 @@ sub is_valid | |||
1143 | if ($keyword eq "GMP" && $no_gmp) { return 0; } | 1167 | if ($keyword eq "GMP" && $no_gmp) { return 0; } |
1144 | if ($keyword eq "RFC3779" && $no_rfc3779) { return 0; } | 1168 | if ($keyword eq "RFC3779" && $no_rfc3779) { return 0; } |
1145 | if ($keyword eq "TLSEXT" && $no_tlsext) { return 0; } | 1169 | if ($keyword eq "TLSEXT" && $no_tlsext) { return 0; } |
1170 | if ($keyword eq "PSK" && $no_psk) { return 0; } | ||
1146 | if ($keyword eq "CMS" && $no_cms) { return 0; } | 1171 | if ($keyword eq "CMS" && $no_cms) { return 0; } |
1172 | if ($keyword eq "SSL2" && $no_ssl2) { return 0; } | ||
1147 | if ($keyword eq "CAPIENG" && $no_capieng) { return 0; } | 1173 | if ($keyword eq "CAPIENG" && $no_capieng) { return 0; } |
1148 | if ($keyword eq "JPAKE" && $no_jpake) { return 0; } | 1174 | if ($keyword eq "JPAKE" && $no_jpake) { return 0; } |
1149 | if ($keyword eq "DEPRECATED" && $no_deprecated) { return 0; } | 1175 | if ($keyword eq "DEPRECATED" && $no_deprecated) { return 0; } |