diff options
Diffstat (limited to 'src/lib/libcrypto/util/mkdef.pl')
| -rw-r--r-- | src/lib/libcrypto/util/mkdef.pl | 40 |
1 files changed, 35 insertions, 5 deletions
diff --git a/src/lib/libcrypto/util/mkdef.pl b/src/lib/libcrypto/util/mkdef.pl index ab47329097..9a8c7b87d1 100644 --- a/src/lib/libcrypto/util/mkdef.pl +++ b/src/lib/libcrypto/util/mkdef.pl | |||
| @@ -79,13 +79,15 @@ 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" ); | 82 | "EXPORT_VAR_AS_FUNCTION", "ZLIB", "OPENSSL_FIPS" ); |
| 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", "WHIRLPOOL", "RSA", "DSA", "DH", "EC", "ECDH", "ECDSA", | 87 | "MDC2", "WHIRLPOOL", "RSA", "DSA", "DH", "EC", "ECDH", "ECDSA", "EC2M", |
| 88 | "HMAC", "AES", "CAMELLIA", "SEED", "GOST", | 88 | "HMAC", "AES", "CAMELLIA", "SEED", "GOST", |
| 89 | # EC_NISTP_64_GCC_128 | ||
| 90 | "EC_NISTP_64_GCC_128", | ||
| 89 | # Envelope "algorithms" | 91 | # Envelope "algorithms" |
| 90 | "EVP", "X509", "ASN1_TYPEDEFS", | 92 | "EVP", "X509", "ASN1_TYPEDEFS", |
| 91 | # Helper "algorithms" | 93 | # Helper "algorithms" |
| @@ -98,7 +100,7 @@ my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF", | |||
| 98 | # RFC3779 | 100 | # RFC3779 |
| 99 | "RFC3779", | 101 | "RFC3779", |
| 100 | # TLS | 102 | # TLS |
| 101 | "TLSEXT", "PSK", | 103 | "TLSEXT", "PSK", "SRP", "HEARTBEATS", |
| 102 | # CMS | 104 | # CMS |
| 103 | "CMS", | 105 | "CMS", |
| 104 | # CryptoAPI Engine | 106 | # CryptoAPI Engine |
| @@ -107,8 +109,14 @@ my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF", | |||
| 107 | "SSL2", | 109 | "SSL2", |
| 108 | # JPAKE | 110 | # JPAKE |
| 109 | "JPAKE", | 111 | "JPAKE", |
| 112 | # NEXTPROTONEG | ||
| 113 | "NEXTPROTONEG", | ||
| 110 | # Deprecated functions | 114 | # Deprecated functions |
| 111 | "DEPRECATED" ); | 115 | "DEPRECATED", |
| 116 | # Hide SSL internals | ||
| 117 | "SSL_INTERN", | ||
| 118 | # SCTP | ||
| 119 | "SCTP"); | ||
| 112 | 120 | ||
| 113 | my $options=""; | 121 | my $options=""; |
| 114 | open(IN,"<Makefile") || die "unable to open Makefile!\n"; | 122 | open(IN,"<Makefile") || die "unable to open Makefile!\n"; |
| @@ -127,7 +135,10 @@ my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; my $no_aes; my $no_krb5; | |||
| 127 | my $no_ec; my $no_ecdsa; my $no_ecdh; my $no_engine; my $no_hw; | 135 | my $no_ec; my $no_ecdsa; my $no_ecdh; my $no_engine; my $no_hw; |
| 128 | my $no_fp_api; my $no_static_engine=1; my $no_gmp; my $no_deprecated; | 136 | my $no_fp_api; my $no_static_engine=1; my $no_gmp; my $no_deprecated; |
| 129 | my $no_rfc3779; my $no_psk; my $no_tlsext; my $no_cms; my $no_capieng; | 137 | my $no_rfc3779; my $no_psk; my $no_tlsext; my $no_cms; my $no_capieng; |
| 130 | my $no_jpake; my $no_ssl2; | 138 | my $no_jpake; my $no_srp; my $no_ssl2; my $no_ec2m; my $no_nistp_gcc; |
| 139 | my $no_nextprotoneg; my $no_sctp; | ||
| 140 | |||
| 141 | my $fips; | ||
| 131 | 142 | ||
| 132 | my $zlib; | 143 | my $zlib; |
| 133 | 144 | ||
| @@ -151,6 +162,7 @@ foreach (@ARGV, split(/ /, $options)) | |||
| 151 | } | 162 | } |
| 152 | $VMS=1 if $_ eq "VMS"; | 163 | $VMS=1 if $_ eq "VMS"; |
| 153 | $OS2=1 if $_ eq "OS2"; | 164 | $OS2=1 if $_ eq "OS2"; |
| 165 | $fips=1 if /^fips/; | ||
| 154 | if ($_ eq "zlib" || $_ eq "enable-zlib" || $_ eq "zlib-dynamic" | 166 | if ($_ eq "zlib" || $_ eq "enable-zlib" || $_ eq "zlib-dynamic" |
| 155 | || $_ eq "enable-zlib-dynamic") { | 167 | || $_ eq "enable-zlib-dynamic") { |
| 156 | $zlib = 1; | 168 | $zlib = 1; |
| @@ -215,9 +227,14 @@ foreach (@ARGV, split(/ /, $options)) | |||
| 215 | elsif (/^no-rfc3779$/) { $no_rfc3779=1; } | 227 | elsif (/^no-rfc3779$/) { $no_rfc3779=1; } |
| 216 | elsif (/^no-tlsext$/) { $no_tlsext=1; } | 228 | elsif (/^no-tlsext$/) { $no_tlsext=1; } |
| 217 | elsif (/^no-cms$/) { $no_cms=1; } | 229 | elsif (/^no-cms$/) { $no_cms=1; } |
| 230 | elsif (/^no-ec2m$/) { $no_ec2m=1; } | ||
| 231 | elsif (/^no-ec_nistp_64_gcc_128$/) { $no_nistp_gcc=1; } | ||
| 232 | elsif (/^no-nextprotoneg$/) { $no_nextprotoneg=1; } | ||
| 218 | elsif (/^no-ssl2$/) { $no_ssl2=1; } | 233 | elsif (/^no-ssl2$/) { $no_ssl2=1; } |
| 219 | elsif (/^no-capieng$/) { $no_capieng=1; } | 234 | elsif (/^no-capieng$/) { $no_capieng=1; } |
| 220 | elsif (/^no-jpake$/) { $no_jpake=1; } | 235 | elsif (/^no-jpake$/) { $no_jpake=1; } |
| 236 | elsif (/^no-srp$/) { $no_srp=1; } | ||
| 237 | elsif (/^no-sctp$/) { $no_sctp=1; } | ||
| 221 | } | 238 | } |
| 222 | 239 | ||
| 223 | 240 | ||
| @@ -254,8 +271,10 @@ $max_crypto = $max_num; | |||
| 254 | my $ssl="ssl/ssl.h"; | 271 | my $ssl="ssl/ssl.h"; |
| 255 | $ssl.=" ssl/kssl.h"; | 272 | $ssl.=" ssl/kssl.h"; |
| 256 | $ssl.=" ssl/tls1.h"; | 273 | $ssl.=" ssl/tls1.h"; |
| 274 | $ssl.=" ssl/srtp.h"; | ||
| 257 | 275 | ||
| 258 | my $crypto ="crypto/crypto.h"; | 276 | my $crypto ="crypto/crypto.h"; |
| 277 | $crypto.=" crypto/cryptlib.h"; | ||
| 259 | $crypto.=" crypto/o_dir.h"; | 278 | $crypto.=" crypto/o_dir.h"; |
| 260 | $crypto.=" crypto/o_str.h"; | 279 | $crypto.=" crypto/o_str.h"; |
| 261 | $crypto.=" crypto/o_time.h"; | 280 | $crypto.=" crypto/o_time.h"; |
| @@ -285,6 +304,7 @@ $crypto.=" crypto/ec/ec.h" ; # unless $no_ec; | |||
| 285 | $crypto.=" crypto/ecdsa/ecdsa.h" ; # unless $no_ecdsa; | 304 | $crypto.=" crypto/ecdsa/ecdsa.h" ; # unless $no_ecdsa; |
| 286 | $crypto.=" crypto/ecdh/ecdh.h" ; # unless $no_ecdh; | 305 | $crypto.=" crypto/ecdh/ecdh.h" ; # unless $no_ecdh; |
| 287 | $crypto.=" crypto/hmac/hmac.h" ; # unless $no_hmac; | 306 | $crypto.=" crypto/hmac/hmac.h" ; # unless $no_hmac; |
| 307 | $crypto.=" crypto/cmac/cmac.h" ; # unless $no_hmac; | ||
| 288 | 308 | ||
| 289 | $crypto.=" crypto/engine/engine.h"; # unless $no_engine; | 309 | $crypto.=" crypto/engine/engine.h"; # unless $no_engine; |
| 290 | $crypto.=" crypto/stack/stack.h" ; # unless $no_stack; | 310 | $crypto.=" crypto/stack/stack.h" ; # unless $no_stack; |
| @@ -319,6 +339,7 @@ $crypto.=" crypto/pqueue/pqueue.h"; | |||
| 319 | $crypto.=" crypto/cms/cms.h"; | 339 | $crypto.=" crypto/cms/cms.h"; |
| 320 | $crypto.=" crypto/jpake/jpake.h"; | 340 | $crypto.=" crypto/jpake/jpake.h"; |
| 321 | $crypto.=" crypto/modes/modes.h"; | 341 | $crypto.=" crypto/modes/modes.h"; |
| 342 | $crypto.=" crypto/srp/srp.h"; | ||
| 322 | 343 | ||
| 323 | my $symhacks="crypto/symhacks.h"; | 344 | my $symhacks="crypto/symhacks.h"; |
| 324 | 345 | ||
| @@ -1126,6 +1147,9 @@ sub is_valid | |||
| 1126 | if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX || $W32 || $W16)) { | 1147 | if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX || $W32 || $W16)) { |
| 1127 | return 1; | 1148 | return 1; |
| 1128 | } | 1149 | } |
| 1150 | if ($keyword eq "OPENSSL_FIPS" && $fips) { | ||
| 1151 | return 1; | ||
| 1152 | } | ||
| 1129 | if ($keyword eq "ZLIB" && $zlib) { return 1; } | 1153 | if ($keyword eq "ZLIB" && $zlib) { return 1; } |
| 1130 | return 0; | 1154 | return 0; |
| 1131 | } else { | 1155 | } else { |
| @@ -1172,9 +1196,15 @@ sub is_valid | |||
| 1172 | if ($keyword eq "TLSEXT" && $no_tlsext) { return 0; } | 1196 | if ($keyword eq "TLSEXT" && $no_tlsext) { return 0; } |
| 1173 | if ($keyword eq "PSK" && $no_psk) { return 0; } | 1197 | if ($keyword eq "PSK" && $no_psk) { return 0; } |
| 1174 | if ($keyword eq "CMS" && $no_cms) { return 0; } | 1198 | if ($keyword eq "CMS" && $no_cms) { return 0; } |
| 1199 | if ($keyword eq "EC2M" && $no_ec2m) { return 0; } | ||
| 1200 | if ($keyword eq "NEXTPROTONEG" && $no_nextprotoneg) { return 0; } | ||
| 1201 | if ($keyword eq "EC_NISTP_64_GCC_128" && $no_nistp_gcc) | ||
| 1202 | { return 0; } | ||
| 1175 | if ($keyword eq "SSL2" && $no_ssl2) { return 0; } | 1203 | if ($keyword eq "SSL2" && $no_ssl2) { return 0; } |
| 1176 | if ($keyword eq "CAPIENG" && $no_capieng) { return 0; } | 1204 | if ($keyword eq "CAPIENG" && $no_capieng) { return 0; } |
| 1177 | if ($keyword eq "JPAKE" && $no_jpake) { return 0; } | 1205 | if ($keyword eq "JPAKE" && $no_jpake) { return 0; } |
| 1206 | if ($keyword eq "SRP" && $no_srp) { return 0; } | ||
| 1207 | if ($keyword eq "SCTP" && $no_sctp) { return 0; } | ||
| 1178 | if ($keyword eq "DEPRECATED" && $no_deprecated) { return 0; } | 1208 | if ($keyword eq "DEPRECATED" && $no_deprecated) { return 0; } |
| 1179 | 1209 | ||
| 1180 | # Nothing recognise as true | 1210 | # Nothing recognise as true |
