openssl/hobble-openssl
cvsdist 00ff72af4a auto-import changelog data from openssl-0.9.6-9.src.rpm
Wed Jul 11 2001 Nalin Dahyabhai <nalin@redhat.com>
- add patches to fix PRNG flaws, supplied by Bodo Moeller and the OpenSSL
    Group
2004-09-09 09:36:18 +00:00

35 lines
964 B
Bash
Executable File

#!/bin/sh
# Clean out patent-or-otherwise-encumbered code.
# MDC-2: 4,908,861 13/03/2007
# IDEA: 5,214,703 25/05/2010
# RC5: 5,724,428 03/03/2015
# Bah. Assembler is hard to port.
(find crypto/{idea,mdc2,rc5,sha}/asm -type f | xargs -r rm -fv)
# IDEA, MDC2 and RC5.
for c in `find crypto/{idea,mdc2,rc5} -name "*.c" -a \! -name "*test*" -type f` ; do
echo Destroying $c
> $c
done
for c in `find crypto/evp -name "*_r5.c" -o -name "*_i.c" -o -name "*_mdc2.c" `; do
echo Destroying $c
> $c
done
for h in `find crypto ssl apps test -name "*.h"` ; do
echo Removing IDEA, MDC2, and RC5 references from $h
cat $h | \
awk 'BEGIN {ech=1;} \
/#[ \t]*if/ {if(ech < 1) ech--;} \
/#[ \t]*ifndef.*NO_IDEA/ {ech--;} \
/#[ \t]*ifndef.*NO_MDC2/ {ech--;} \
/#[ \t]*ifndef.*NO_RC5/ {ech--;} \
{if(ech>0) {;print $0};} \
/#endif/ {if(ech < 1) ech++;}' > $h.hobbled && \
mv $h.hobbled $h
done
# Make the makefiles happy.
touch crypto/rc5/asm/rc5-586.pl