aboutsummaryrefslogtreecommitdiff
path: root/util/mkstack.pl
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2000-06-20 18:45:28 +0000
committerDr. Stephen Henson <steve@openssl.org>2000-06-20 18:45:28 +0000
commit7ef8206859f9a52f48e817c023c744fe00e82c5d (patch)
tree89e55f7fd70571d3641d9d98f4e0e0f042ddad2f /util/mkstack.pl
parent438fa2fdc1f7fe01579ce1a62fe114c8475136f9 (diff)
downloadopenssl-7ef8206859f9a52f48e817c023c744fe00e82c5d.zip
openssl-7ef8206859f9a52f48e817c023c744fe00e82c5d.tar.gz
openssl-7ef8206859f9a52f48e817c023c744fe00e82c5d.tar.bz2
Handle ASN1_SET_OF and PKCS12_STACK_OF using function
casts in the same way as STACK_OF.
Diffstat (limited to 'util/mkstack.pl')
-rwxr-xr-xutil/mkstack.pl25
1 files changed, 25 insertions, 0 deletions
diff --git a/util/mkstack.pl b/util/mkstack.pl
index ec76351..6437138 100755
--- a/util/mkstack.pl
+++ b/util/mkstack.pl
@@ -31,12 +31,17 @@ foreach $file (@source) {
while(<IN>) {
if (/^DECLARE_STACK_OF\(([^)]+)\)/) {
push @stacklst, $1;
+ } if (/^DECLARE_ASN1_SET_OF\(([^)]+)\)/) {
+ push @asn1setlst, $1;
+ } if (/^DECLARE_PKCS12_STACK_OF\(([^)]+)\)/) {
+ push @p12stklst, $1;
}
}
close(IN);
}
+
my $old_stackfile = "";
my $new_stackfile = "";
my $inside_block = 0;
@@ -81,6 +86,26 @@ while(<IN>) {
#define sk_${type_thing}_sort(st) SKM_sk_sort($type_thing, (st))
EOF
}
+ foreach $type_thing (@asn1setlst) {
+ $new_stackfile .= <<EOF;
+
+#define d2i_ASN1_SET_OF_${type_thing}(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\
+ SKM_ASN1_SET_OF_d2i($type_thing, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))
+#define i2d_ASN1_SET_OF_${type_thing}(st, pp, i2d_func, ex_tag, ex_class, is_set) \\
+ SKM_ASN1_SET_OF_i2d($type_thing, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
+#define ASN1_seq_pack_${type_thing}(st, i2d_func, buf, len) \\
+ SKM_ASN1_seq_pack($type_thing, (st), (i2d_func), (buf), (len))
+#define ASN1_seq_unpack_${type_thing}(buf, len, d2i_func, free_func) \\
+ SKM_ASN1_seq_unpack($type_thing, (buf), (len), (d2i_func), (free_func))
+EOF
+ }
+ foreach $type_thing (@p12stklst) {
+ $new_stackfile .= <<EOF;
+
+#define PKCS12_decrypt_d2i_${type_thing}(algor, d2i_func, free_func, pass, passlen, oct, seq) \\
+ SKM_PKCS12_decrypt_d2i($type_thing, (algor), (d2i_func), (free_func), (pass), (passlen), (oct), (seq))
+EOF
+ }
$new_stackfile .= "/* End of util/mkstack.pl block, you may now edit :-) */\n";
$inside_block = 2;
}