【问题标题】:Cannot compile apache with fips无法使用 fips 编译 apache
【发布时间】:2018-08-28 10:29:18
【问题描述】:

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

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

  • openssl-fips-2.0.16.tar.gz
  • openssl-1.0.2n.tar.gz
  • httpd-2.4.29.tar.gz
  • apr-util-1.6.1.tar.gz
  • apr-1.6.3.tar.gz
  • pcre-8.41.tar.gz

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

  • 导出 CC=/usr/local/ssl/fips-2.0/bin/fipsld
  • 导出 FIPSLD_CC=/usr/bin/gcc

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

  /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 的专家,所以不知道为什么在使用这些导出的变量时它会失败。有人可以帮忙吗?

【问题讨论】:

  • 仅供参考,我尝试使用 wiki 上列出的所有旧版本的 httpd、apr、fips、openssl、apr-util 和 pcre,在这种情况下,一切都可以正常编译。所以这开始看起来像新版本中的一个错误,除非我错过了其他东西

标签: apache fips


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-07-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-09
    • 2022-01-10
    相关资源
    最近更新 更多