21f826b
#!/bin/bash
21f826b
# script to remove symbol collisions between cryptlib and openssl
21f826b
#
21f826b
# Author:  Ralf Senderek
21f826b
# Date:    15 July 2016
21f826b
# License: BSD
21f826b
#
21f826b
# this script must be run in the cryptlib directory before building the
21f826b
# shared library
21f826b
21f826b
for F in $(find . -type f)
21f826b
do
21f826b
    sed -i 's/BN_/cl_BN_/g' $F
21f826b
    sed -i 's/bn_/cl_bn_/g' $F
21f826b
    sed -i 's/CAST_/cl_CAST_/g' $F
21f826b
    sed -i 's/MD5_/cl_MD5_/g' $F
21f826b
    sed -i 's/SHA1_/cl_SHA1_/g' $F
21f826b
    sed -i 's/sha1_block/cl_sha1_block/g' $F
21f826b
    sed -i 's/idea_/cl_idea_/g' $F
21f826b
done
21f826b
21f826b
# rename RC4 to cl_RC4
21f826b
21f826b
sed -i 's/RC4(/cl_RC4(/g' context/ctx_rc4.c
21f826b
sed -i 's/RC4(/cl_RC4(/g' crypt/rc4.h
21f826b
sed -i 's/RC4(/cl_RC4(/g' crypt/rc4enc.c
21f826b
21f826b
cd bn
21f826b
for F in $(ls bn_*)
21f826b
do
21f826b
     mv $F cl_$F
21f826b
done
21f826b
21f826b
#------------------------------------------------------------------#