3 # Quit out if anything fails.
6 # Clean out patent-or-otherwise-encumbered code.
7 # MDC-2: 4,908,861 13/03/2007
8 # IDEA: 5,214,703 25/05/2010
9 # RC5: 5,724,428 03/03/2015
10 # EC: ????????? ??/??/2015
12 # Remove assembler portions of IDEA, MDC2, and RC5.
13 (find crypto/{idea,mdc2,rc5}/asm -type f | xargs -r rm -fv)
15 # IDEA, MDC2, RC5, EC.
16 for a in idea mdc2 rc5 ec ecdh ecdsa; do
17 for c in `find crypto/$a -name "*.c" -a \! -name "*test*" -type f` ; do
23 for c in `find crypto/evp -name "*_rc5.c" -o -name "*_idea.c" -o -name "*_mdc2.c" -o -name "*_ecdsa.c"`; do
28 for h in `find crypto ssl apps test -name "*.h"` ; do
29 echo Removing IDEA, MDC2, RC5, and EC references from $h
32 /^#[ \t]*ifndef.*NO_IDEA/ {ech--; next;} \
33 /^#[ \t]*ifndef.*NO_MDC2/ {ech--; next;} \
34 /^#[ \t]*ifndef.*NO_RC5/ {ech--; next;} \
35 /^#[ \t]*ifndef.*NO_EC/ {ech--; next;} \
36 /^#[ \t]*ifndef.*NO_ECDH/ {ech--; next;} \
37 /^#[ \t]*ifndef.*NO_ECDSA/ {ech--; next;} \
38 /^#[ \t]*if/ {if(ech < 1) ech--;} \
39 {if(ech>0) {;print $0};} \
40 /^#[ \t]*endif/ {if(ech < 1) ech++;}' > $h.hobbled && \
44 # Make the makefiles happy.
45 touch crypto/rc5/asm/rc5-586.pl