Blame SOURCES/hobble-openssl

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