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
|
2011-01-04 07:19:15 +00:00
|
|
|
# RC5: 5,724,428 01/11/2015
|
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.
|
2012-02-29 20:54:08 +00:00
|
|
|
(find crypto/rc5/asm -type f | xargs -r rm -fv)
|
2004-09-09 09:35:06 +00:00
|
|
|
|
2013-10-15 01:08:35 +00:00
|
|
|
# RC5, SRP.
|
|
|
|
for a in rc5 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-15 01:08:35 +00:00
|
|
|
for c in `find crypto/evp -name "*_rc5.c"`; 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: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
|
|
|
|
|
|
|
|
for c in `find crypto/ec -name "ec2*.c" -o -name "ec_curve.c" -o -name "ecp_nistp?2?.c" -o -name "ectest.c"`; do
|
|
|
|
echo Destroying $c
|
|
|
|
> $c
|
|
|
|
done
|
|
|
|
|
2004-09-09 09:36:18 +00:00
|
|
|
for h in `find crypto ssl apps test -name "*.h"` ; do
|
2013-10-16 12:37:51 +00:00
|
|
|
echo Removing RC5, 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;} \
|
2005-11-08 13:52:29 +00:00
|
|
|
/^#[ \t]*ifndef.*NO_RC5/ {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
|
2004-09-09 09:35:41 +00:00
|
|
|
|
2004-09-09 09:35:06 +00:00
|
|
|
# Make the makefiles happy.
|
|
|
|
touch crypto/rc5/asm/rc5-586.pl
|