summaryrefslogtreecommitdiffstats
path: root/util/mkstack.pl
diff options
context:
space:
mode:
Diffstat (limited to 'util/mkstack.pl')
-rwxr-xr-xutil/mkstack.pl36
1 files changed, 33 insertions, 3 deletions
diff --git a/util/mkstack.pl b/util/mkstack.pl
index 2a968f395f..e3675763a9 100755
--- a/util/mkstack.pl
+++ b/util/mkstack.pl
@@ -21,7 +21,7 @@ while (@ARGV) {
}
-@source = (<crypto/*.[ch]>, <crypto/*/*.[ch]>, <ssl/*.[ch]>);
+@source = (<crypto/*.[ch]>, <crypto/*/*.[ch]>, <ssl/*.[ch]>, <apps/*.[ch]>);
foreach $file (@source) {
next if -l $file;
@@ -31,11 +31,16 @@ foreach $file (@source) {
while(<IN>) {
if (/^DECLARE_STACK_OF\(([^)]+)\)/) {
push @stacklst, $1;
- } if (/^DECLARE_ASN1_SET_OF\(([^)]+)\)/) {
+ }
+ if (/^DECLARE_ASN1_SET_OF\(([^)]+)\)/) {
push @asn1setlst, $1;
- } if (/^DECLARE_PKCS12_STACK_OF\(([^)]+)\)/) {
+ }
+ if (/^DECLARE_PKCS12_STACK_OF\(([^)]+)\)/) {
push @p12stklst, $1;
}
+ if (/^DECLARE_LHASH_OF\(([^)]+)\)/) {
+ push @lhashlst, $1;
+ }
}
close(IN);
}
@@ -108,6 +113,31 @@ EOF
SKM_PKCS12_decrypt_d2i($type_thing, (algor), (d2i_func), (free_func), (pass), (passlen), (oct), (seq))
EOF
}
+
+ foreach $type_thing (sort @lhashlst) {
+ my $lc_tt = lc $type_thing;
+ $new_stackfile .= <<EOF;
+
+#define lh_${type_thing}_new() LHM_lh_new(${type_thing},${lc_tt})
+#define lh_${type_thing}_insert(lh,inst) LHM_lh_insert(${type_thing},lh,inst)
+#define lh_${type_thing}_retrieve(lh,inst) LHM_lh_retrieve(${type_thing},lh,inst)
+#define lh_${type_thing}_delete(lh,inst) LHM_lh_delete(${type_thing},lh,inst)
+#define lh_${type_thing}_doall(lh,fn) LHM_lh_doall(${type_thing},lh,fn)
+#define lh_${type_thing}_doall_arg(lh,fn,arg_type,arg) \\
+ LHM_lh_doall_arg(${type_thing},lh,fn,arg_type,arg)
+#define lh_${type_thing}_error(lh) LHM_lh_error(${type_thing},lh)
+#define lh_${type_thing}_num_items(lh) LHM_lh_num_items(${type_thing},lh)
+#define lh_${type_thing}_down_load(lh) LHM_lh_down_load(${type_thing},lh)
+#define lh_${type_thing}_node_stats_bio(lh,out) \\
+ LHM_lh_node_stats_bio(${type_thing},lh,out)
+#define lh_${type_thing}_node_usage_stats_bio(lh,out) \\
+ LHM_lh_node_usage_stats_bio(${type_thing},lh,out)
+#define lh_${type_thing}_stats_bio(lh,out) \\
+ LHM_lh_stats_bio(${type_thing},lh,out)
+#define lh_${type_thing}_free(lh) LHM_lh_free(${type_thing},lh)
+EOF
+ }
+
$new_stackfile .= "/* End of util/mkstack.pl block, you may now edit :-) */\n";
$inside_block = 2;
}