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