1

我对 RHEL8 感到困惑。它报告:

# openssl
OpenSSL> version
OpenSSL 1.1.1g FIPS  21 Apr 2020
OpenSSL> exit
# find / -name fipscanister*.*

我的系统报告正在运行符合 FIPS 的 OpenSSL,但我没有在系统上找到 FIPS 容器……我检查了 ISO(rhel-8.4-x86_64-dvd.iso),在 BaseOS/Packages 中有:openssl- devel-1.1.1g-15.el8_3.x86_64.rpm,但它也不包含 FIPS 容器...

需要做什么才能在系统上安装 fipscanister 库?

BR,雷内

4

1 回答 1

1

我假设您的意思是fipscanister.o (编译FIPS算法的目标文件)。你不会找到它,因为它链接在libcrypto.so*中。

根据[OpenSSL]:UserGuide-2.0.pdf - OpenSSL FIPS Object Module v2.0 的用户指南重点是我的):

请注意,除了在最不寻常的情况下,FIPS 对象模块本身 ( fipscanister.o ) 不直接与应用程序代码链接。相反,FIPS 对象模块嵌入在 OpenSSL libcrypto 库 (libcrypto.a/libcrypto.so)中,然后应用程序代码以通常的方式引用该库。这种组合被称为“支持 FIPS”的 OpenSSL 库,将在第 2.5 节中进行更详细的讨论。

检查[SO]: OpenSSL FIPS_mode_set not working in Python cryptography library (@CristiFati's answer)了解(一些有趣的)细节。

这是一些示例输出([SO] 留下的环境:如何使用 SSL 在 RHEL 上编译 python3?无法导入 SSL(@CristiFati 的回答)):

[root@cfati-5510-0:/work/q069539286]> python
Python 2.7.5 (default, Nov 16 2020, 22:23:17) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes as ct
>>> 
>>> lcr = ct.CDLL("openssl-1.1.1g/lib/libcrypto.so")  # Load a library
>>> lcr.FIPS_mode()  # Call a function exported by it (for demo purposes only, not use (like this) in production)
0
于 2021-10-28T22:25:50.467 回答