如何确保curl使用openssl而不是nss?

时间:2013-05-22 19:13:46

标签: curl fips rhel6

是否可以通过配置parameter确保curl使用OpenSSL NSS来检索https内容?我需要确保这一点,以便强制遵守RHEL6.2已经认证的FIPS140-2吗?

我认为答案是“不”。

所以我也会在这里询问后续内容......我可以重新编译curl以确保它使用libssl而不是libnss吗?我试过了:

./configure --with-ssl --without-nss

我仍然最终得到一个动态链接libnss3.so的curl二进制文件。

[root@fips curl-7.19.7]# ldd /usr/bin/curl 
        linux-vdso.so.1 =>  (0x00007fffacbe8000)
        libcurl.so.4 => /usr/lib64/libcurl.so.4 (0x00007f5d8fe03000)
        libidn.so.11 => /lib64/libidn.so.11 (0x00007f5d8fbd1000)
        libldap-2.4.so.2 => /lib64/libldap-2.4.so.2 (0x00007f5d8f983000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f5d8f77b000)
        libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f5d8f537000)
        libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f5d8f250000)
        libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f5d8f024000)
        libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f5d8ee20000)
        libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f5d8ebc2000)
        libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f5d8e828000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f5d8e624000)
        libssh2.so.1 => /usr/lib64/libssh2.so.1 (0x00007f5d8e3fb000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f5d8e1e5000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f5d8de52000)
        liblber-2.4.so.2 => /lib64/liblber-2.4.so.2 (0x00007f5d8dc42000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f5d8da28000)
        libssl3.so => /usr/lib64/libssl3.so (0x00007f5d8d7f2000)
        libsmime3.so => /usr/lib64/libsmime3.so (0x00007f5d8d5c5000)
--->    libnss3.so => /usr/lib64/libnss3.so (0x00007f5d8d28a000)
--->    libnssutil3.so => /usr/lib64/libnssutil3.so (0x00007f5d8d05f000)
        libplds4.so => /lib64/libplds4.so (0x00007f5d8ce5a000)
        libplc4.so => /lib64/libplc4.so (0x00007f5d8cc55000)
        libnspr4.so => /lib64/libnspr4.so (0x00007f5d8ca18000)
        libsasl2.so.2 => /usr/lib64/libsasl2.so.2 (0x00007f5d8c7fd000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f5d8c5e0000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f5d90062000)
        libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f5d8c3d5000)
        libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f5d8c1d1000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f5d8bf99000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f5d8bd7a000)
        libfreebl3.so => /lib64/libfreebl3.so (0x00007f5d8bb18000)

2 个答案:

答案 0 :(得分:1)

尝试:

./configure --with-ssl=/usr/include --without-nss

答案 1 :(得分:0)

我遇到了同样的问题。但是,如果你去: ./configure --without-nss --with-ssl = / usr / lib64 它正确地获取openssl库并排除nss。 libcurl的某些部分将使用nss(我不知道是什么)所以ldd将报告它与nss的链接,但在我的情况下这不是问题。我检查了/ usr / lib64中的安装目录,它仍然有旧的libcurl库。我的副本安装在/ usr / lib / local /中。所以,当我删除/ usr / lib64中的那些并用它们工作的所有新生成的文件替换它们时。所以我想你可以使用--libdir = / usr / lib64配置,但你必须删除旧的库。然后我做了ldconfig来重新加载它们。