无法使用 fips 编译 apache

Cannot compile apache with fips

我需要 运行 fips 140-2 模式下的 apache,我正在按照此处给出的说明进行操作:https://wiki.openssl.org/index.php/FIPS_Library_and_Apache

但是我使用的是更新版本的 apache,我有这些包而不是 wiki 中列出的包:

一切正常,直到我尝试对 httpd 包进行 make 然后它失败了。如果我 运行 没有两个指纹导出的 make,它可以毫无问题地完成:

然而,正如 wiki 所描述的那样,当您在 httpd.conf 中启用 SSLFIPS 时,如果没有设置这些变量,它将无法启动指纹问题。但是,当我尝试 运行 使用这些导出进行制作时,出现以下错误:

  /root/httpd-2.4.29/srclib/apr/libtool --silent --mode=link /usr/local/ssl/fips-2.0/bin/fipsld  -g -O2 -pthread   -L/usr/local/ssl/lib -lssl -lcrypto -luuid -lrt -lcrypt -lpthread -ldl  \
         -o ab  ab.lo       /root/httpd-2.4.29/srclib/apr-util/libaprutil-1.la -lexpat /root/httpd-2.4.29/srclib/apr/libapr-1.la -luuid -lrt -lcrypt -lpthread -ldl -lm
./.libs/ab: error while loading shared libraries: libaprutil-1.so.0: cannot open shared object file: No such file or directory
Makefile:73: recipe for target 'ab' failed
make[2]: *** [ab] Error 127
make[2]: Leaving directory '/root/httpd-2.4.29/support'
/root/httpd-2.4.29/build/rules.mk:75: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/root/httpd-2.4.29/support'
/root/httpd-2.4.29/build/rules.mk:75: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

我不是编译 apache 的专家,所以不知道为什么在使用那些导出的变量时会失败。有人可以帮忙吗?

经过大量测试,说明似乎适用于旧版本,但对于新版本的 apr 和 httpd,“--with-included-apr”似乎是问题所在。

我们没有使用它,而是首先自己构建了 apr 和 apr-util,然后 运行 .config 带有“”-with-apr=/usr/local/apr/ -用-apr-util=/usr/local/apr-util/" 代替。这允许它编译并且我能够毫无问题地设置 SSLFIPS。