编译OpenSSL
1. 下载上游代码
我们从Github上下载受此安全漏洞影响的源码。代码库为https://github.com/openssl/openssl。受此漏洞影响的版本为1.0.1f。您可以使用下面的命令来直接下载指定的代码分支:
git clone https://github.com/openssl/openssl --branch=OpenSSL_1_0_1f --depth=1
2. 编译OpenSSL
接下来,使用 wfuzz-cc
编译器编译 OpenSSL:
cd openssl
export CC=wfuzz-cc
./config --prefix=$PWD/install
make
make install_sw
#install_sw相比于install,不安装文档,只安装库文件和头文件
3. 检查编译文件
编译完成后,OpenSSL 的库将会安装在 openssl/install 目录下。请检查下列文件是否存在:
- openssl/install/lib/libcrypto.a
- openssl/install/lib/libssl.a
- openssl/install/include/openssl/
如果均存在,说明已经成功的编译安装了OpenSSL。