Blame SOURCES/hobble-openssl

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