代码之家  ›  专栏  ›  技术社区  ›  DAC

无法使用fips编译apache

  •  0
  • DAC  · 技术社区  · 7 年前

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

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

    • openssl-fips-2.0.16。焦油广州
    • openssl-1.0.2n。焦油广州
    • httpd-2.4.29。焦油广州
    • apr-util-1.6.1。焦油广州
    • 4月1日至6月3日。焦油广州
    • pcre-8.41。焦油广州

    一切正常,直到我尝试在httpd包上制作,然后失败。如果我在没有指纹的两个导出的情况下运行make,它将完成而不会出现问题:

    • 导出CC=/usr/local/ssl/fips-2.0/bin/fipsld
    • 导出FIPSLD\U CC=/usr/bin/gcc

    然而,正如wiki所描述的,当您在httpd中启用SSLFIPS时。conf如果没有设置这些变量,它将无法从指纹问题开始。但是,当我尝试使用这些导出运行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的编译专家,所以不知道为什么在使用这些导出的变量时会失败。有人能帮忙吗?

    1 回复  |  直到 7 年前
        1
  •  0
  •   DAC    7 年前

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

    我们没有使用它,而是先自行构建apr和apr util,然后运行。改为使用“-with apr=/usr/local/apr/-with apr util=/usr/local/apr util/”进行配置。这允许它进行编译,我可以毫无问题地设置SSLFIPS。