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