mingw-openssl/hobble-openssl

48 lines
1.3 KiB
Plaintext
Raw Normal View History

2009-02-09 09:33:37 +00:00
#!/bin/sh
# Quit out if anything fails.
set -e
# Clean out patent-or-otherwise-encumbered code.
# MDC-2: 4,908,861 13/03/2007 - expired, we do not remove it but do not enable it anyway
2012-11-09 14:23:03 +00:00
# IDEA: 5,214,703 07/01/2012 - expired, we do not remove it anymore
2016-05-07 16:01:07 +00:00
# RC5: 5,724,428 01/11/2015 - expired, we do not remove it anymore
# EC: ????????? ??/??/2020
2012-11-09 14:23:03 +00:00
# SRP: ????????? ??/??/20??
2009-02-09 09:33:37 +00:00
# Remove assembler portions of IDEA, MDC2, and RC5.
2016-05-07 16:01:07 +00:00
# (find crypto/rc5/asm -type f | xargs -r rm -fv)
2009-02-09 09:33:37 +00:00
2016-05-07 16:01:07 +00:00
# SRP.
for a in srp; do
2009-02-09 09:33:37 +00:00
for c in `find crypto/$a -name "*.c" -a \! -name "*test*" -type f` ; do
echo Destroying $c
> $c
done
done
2012-11-09 14:23:03 +00:00
for c in `find crypto/bn -name "*gf2m.c"`; do
2009-02-09 09:33:37 +00:00
echo Destroying $c
> $c
done
for c in `find crypto/ec -name "ec2*.c" -o -name "ec_curve.c" -o -name "ecp_nistp22?.c" -o -name "ectest.c"`; do
echo Destroying $c
> $c
done
2009-02-09 09:33:37 +00:00
for h in `find crypto ssl apps test -name "*.h"` ; do
2016-05-07 16:01:07 +00:00
echo Removing SRP and EC2M references from $h
2009-02-09 09:33:37 +00:00
cat $h | \
awk 'BEGIN {ech=1;} \
2012-11-09 14:23:03 +00:00
/^#[ \t]*ifndef.*NO_SRP/ {ech--; next;} \
/^#[ \t]*ifndef.*NO_EC2M/ {ech--; next;} \
2009-02-09 09:33:37 +00:00
/^#[ \t]*if/ {if(ech < 1) ech--;} \
{if(ech>0) {;print $0};} \
/^#[ \t]*endif/ {if(ech < 1) ech++;}' > $h.hobbled && \
mv $h.hobbled $h
done
# Make the makefiles happy.
2016-05-07 16:01:07 +00:00
# touch crypto/rc5/asm/rc5-586.pl