1#!/usr/bin/env perl 2# 3# pull APPLINK_MAX value from applink.c... 4$applink_c=$0; 5$applink_c=~s|[^/\\]+$||g; 6$applink_c.="applink.c"; 7open(INPUT,$applink_c) || die "can't open $applink_c: $!"; 8@max=grep {/APPLINK_MAX\s+(\d+)/} <INPUT>; 9close(INPUT); 10($#max==0) or die "can't find APPLINK_MAX in $applink_c"; 11 12$max[0]=~/APPLINK_MAX\s+(\d+)/; 13$N=$1; # number of entries in OPENSSL_UplinkTable not including 14 # OPENSSL_UplinkTable[0], which contains this value... 15 161; 17 18# Idea is to fill the OPENSSL_UplinkTable with pointers to stubs 19# which invoke 'void OPENSSL_Uplink (ULONG_PTR *table,int index)'; 20# and then dereference themselves. Latter shall result in endless 21# loop *unless* OPENSSL_Uplink does not replace 'table[index]' with 22# something else, e.g. as 'table[index]=unimplemented;'... 23