- if ($safe_stack_def &&
- /^\s*DECLARE_STACK_OF\s*\(\s*(\w*)\s*\)/) {
- $funcs{"sk_${1}_new"} = 1;
- $funcs{"sk_${1}_new_null"} = 1;
- $funcs{"sk_${1}_free"} = 1;
- $funcs{"sk_${1}_num"} = 1;
- $funcs{"sk_${1}_value"} = 1;
- $funcs{"sk_${1}_set"} = 1;
- $funcs{"sk_${1}_zero"} = 1;
- $funcs{"sk_${1}_push"} = 1;
- $funcs{"sk_${1}_pop"} = 1;
- $funcs{"sk_${1}_find"} = 1;
- $funcs{"sk_${1}_delete"} = 1;
- $funcs{"sk_${1}_delete_ptr"} = 1;
- $funcs{"sk_${1}_set_cmp_func"} = 1;
- $funcs{"sk_${1}_dup"} = 1;
- $funcs{"sk_${1}_pop_free"} = 1;
- $funcs{"sk_${1}_shift"} = 1;
- } elsif ($safe_stack_def &&
- /^\s*DECLARE_ASN1_SET_OF\s*\(\s*(\w*)\s*\)/) {
- $funcs{"d2i_ASN1_SET_OF_${1}"} = 1;
- $funcs{"i2d_ASN1_SET_OF_${1}"} = 1;
- } elsif (
- ($tag{'FreeBSD'} != 1) &&
- ($tag{'CONST_STRICT'} != 1) &&
- (($W32 && ($tag{'WIN16'} != 1)) ||
- (!$W32 && ($tag{'WIN16'} != -1))) &&
- ($tag{'PERL5'} != 1) &&
-# ($tag{'_WINDLL'} != -1) &&
- ((!$W32 && $tag{'_WINDLL'} != -1) ||
- ($W32 && $tag{'_WINDLL'} != 1)) &&
- ((($tag{'NO_FP_API'} != 1) && $W32) ||
- (($tag{'NO_FP_API'} != -1) && !$W32)))
+ if (/^\s*DECLARE_STACK_OF\s*\(\s*(\w*)\s*\)/) {
+ next;
+ } elsif (/^\s*DECLARE_PKCS12_STACK_OF\s*\(\s*(\w*)\s*\)/) {
+ next;
+ } elsif (/^\s*DECLARE_ASN1_SET_OF\s*\(\s*(\w*)\s*\)/) {
+ next;
+ } elsif (/^DECLARE_PEM_rw\s*\(\s*(\w*)\s*,/ ||
+ /^DECLARE_PEM_rw_cb\s*\(\s*(\w*)\s*,/ ) {
+ # Things not in Win16
+ $syms{"PEM_read_${1}"} = 1;
+ $platform{"PEM_read_${1}"} = "!WIN16";
+ $syms{"PEM_write_${1}"} = 1;
+ $platform{"PEM_write_${1}"} = "!WIN16";
+ # Things that are everywhere
+ $syms{"PEM_read_bio_${1}"} = 1;
+ $syms{"PEM_write_bio_${1}"} = 1;
+ if ($1 eq "RSAPrivateKey" ||
+ $1 eq "RSAPublicKey" ||
+ $1 eq "RSA_PUBKEY") {
+ $algorithm{"PEM_read_${1}"} = "RSA";
+ $algorithm{"PEM_write_${1}"} = "RSA";
+ $algorithm{"PEM_read_bio_${1}"} = "RSA";
+ $algorithm{"PEM_write_bio_${1}"} = "RSA";
+ }
+ elsif ($1 eq "DSAPrivateKey" ||
+ $1 eq "DSAparams" ||
+ $1 eq "RSA_PUBKEY") {
+ $algorithm{"PEM_read_${1}"} = "DSA";
+ $algorithm{"PEM_write_${1}"} = "DSA";
+ $algorithm{"PEM_read_bio_${1}"} = "DSA";
+ $algorithm{"PEM_write_bio_${1}"} = "DSA";
+ }
+ elsif ($1 eq "DHparams") {
+ $algorithm{"PEM_read_${1}"} = "DH";
+ $algorithm{"PEM_write_${1}"} = "DH";
+ $algorithm{"PEM_read_bio_${1}"} = "DH";
+ $algorithm{"PEM_write_bio_${1}"} = "DH";
+ }
+ } elsif (/^DECLARE_PEM_write\s*\(\s*(\w*)\s*,/ ||
+ /^DECLARE_PEM_write_cb\s*\(\s*(\w*)\s*,/ ) {
+ # Things not in Win16
+ $syms{"PEM_write_${1}"} = 1;
+ $platform{"PEM_write_${1}"} .= ",!WIN16";
+ # Things that are everywhere
+ $syms{"PEM_write_bio_${1}"} = 1;
+ if ($1 eq "RSAPrivateKey" ||
+ $1 eq "RSAPublicKey" ||
+ $1 eq "RSA_PUBKEY") {
+ $algorithm{"PEM_write_${1}"} = "RSA";
+ $algorithm{"PEM_write_bio_${1}"} = "RSA";
+ }
+ elsif ($1 eq "DSAPrivateKey" ||
+ $1 eq "DSAparams" ||
+ $1 eq "RSA_PUBKEY") {
+ $algorithm{"PEM_write_${1}"} = "DSA";
+ $algorithm{"PEM_write_bio_${1}"} = "DSA";
+ }
+ elsif ($1 eq "DHparams") {
+ $algorithm{"PEM_write_${1}"} = "DH";
+ $algorithm{"PEM_write_bio_${1}"} = "DH";
+ }
+ } elsif (/^DECLARE_PEM_read\s*\(\s*(\w*)\s*,/ ||
+ /^DECLARE_PEM_read_cb\s*\(\s*(\w*)\s*,/ ) {
+ # Things not in Win16
+ $syms{"PEM_read_${1}"} = 1;
+ $platform{"PEM_read_${1}"} .= ",!WIN16";
+ # Things that are everywhere
+ $syms{"PEM_read_bio_${1}"} = 1;
+ } elsif (
+ ($tag{'TRUE'} != -1)
+ && ($tag{'CONST_STRICT'} != 1)
+ )