Cryptopp安装说明:
源文件:cryptopp552.zip
目标机:mipsel-linux
0、在进行crypto安装时,要检查其是非大小端配置完好!在mipsel-linux目标机环境下,要在config.h文件中首行添加此句:
#define IS_LITTLE_ENDIAN
1、修改GNUmakefile:
A、令CXX = mipsel-linux-g++,注释掉原#CXX = g++(共两处)
B、CXX = gcc(在此代码前 添加此语句)
ifeq ($(CXX),gcc) # for some reason CXX is gcc on cygwin 1.1.4
#add mipsel-linux-gcc
#CXX = g++
CXX = mipsel-linux-g++
endif
C、注释掉:#CXXFLAGS += -march=native -mtune=native
2、后补充:要建立crypto的安装目录,并指定到交叉编译器所在的目录下,的“/usr/、/usr/lib/、/usr/include/”同等地位的目录中:
GNUMakefile中添加:
RANLIB = mipsel-linux-ranlib
AR = mipsel-linux-ar #add by sutianzhu
PREFIX = "/opt/toolchain/smp86xx_toolchain_2.8.0.1/build_mipsel_nofpu/staging_dir/"
然后在安装amule时候,指定其安装目录:
--with-crypto-prefix="/opt/toolchain/smp86xx_toolchain_2.8.0.1/build_mipsel_nofpu/staging_dir/"
3、验证crypto的正确安装性:
在make &&make install,运行cryptest.exe可以检验所安装的目标机上,是否可以运行。
运行如下命令:
./cryptest.exe 产生帮助信息
./cryptest.exe v 验证环境及其所有功能是否正确
./cryptest.exe g 查看某项功能是否正确
4、在RSA算法不能通过时,编译选项去掉“-O2”
5、修改/dev/random设备,换为/dev/urandom