ActiveMQ-CPP 3.9.4 是否支持 OpenSSL 1.1.0?

Does ActiveMQ-CPP 3.9.4 Support OpenSSL 1.1.0?

我正在尝试构建最新版本的 Apache ActiveMQ-CPP,即 3.9.4。我已经构建了两个必需的依赖项 APR 和 OpenSSL。对于 OpenSSL,这是版本 1.1.0f。我能够在没有 SSL 支持的情况下构建所有 4 个配置(Debug、DebugDLL、Release、ReleaseDLL)。但是,尝试构建任何支持 SSL 的内容会导致许多错误:

..\src\main\decaf\internal\net\ssl\openssl\OpenSSLContextSpi.cpp(186): error C3861: 'CRYPTO_malloc_init': identifier not found
..\src\main\decaf\internal\net\ssl\openssl\OpenSSLSocket.cpp(667): error C2027: use of undefined type 'X509_extension_st'
C:\OpenSource\OpenSSL.1.0f\include\openssl/x509.h(79): note: see declaration of 'X509_extension_st'
..\src\main\decaf\internal\net\ssl\openssl\OpenSSLSocket.cpp(667): error C2227: left of '->value' must point to class/struct/union/generic type
..\src\main\decaf\internal\net\ssl\openssl\OpenSSLSocket.cpp(667): error C2227: left of '->data' must point to class/struct/union/generic type
..\src\main\decaf\internal\net\ssl\openssl\OpenSSLSocket.cpp(670): error C2027: use of undefined type 'X509_extension_st'
C:\OpenSource\OpenSSL.1.0f\include\openssl/x509.h(79): note: see declaration of 'X509_extension_st'
..\src\main\decaf\internal\net\ssl\openssl\OpenSSLSocket.cpp(670): error C2227: left of '->value' must point to class/struct/union/generic type
..\src\main\decaf\internal\net\ssl\openssl\OpenSSLSocket.cpp(670): error C2227: left of '->length' must point to class/struct/union/generic type
..\src\main\decaf\internal\net\ssl\openssl\OpenSSLSocket.cpp(670): error C2660: 'ASN1_item_d2i': function does not take 3 arguments
..\src\main\decaf\internal\net\ssl\openssl\OpenSSLSocket.cpp(671): error C2027: use of undefined type 'X509_extension_st'
C:\OpenSource\OpenSSL.1.0f\include\openssl/x509.h(79): note: see declaration of 'X509_extension_st'
..\src\main\decaf\internal\net\ssl\openssl\OpenSSLSocket.cpp(671): error C2227: left of '->value' must point to class/struct/union/generic type
..\src\main\decaf\internal\net\ssl\openssl\OpenSSLSocket.cpp(671): error C2227: left of '->length' must point to class/struct/union/generic type
..\src\main\decaf\internal\net\ssl\openssl\OpenSSLSocket.cpp(671): error C2198: 'X509V3_EXT_D2I': too few arguments for call
..\src\main\decaf\internal\net\ssl\openssl\OpenSSLSocket.cpp(671): error C2198: 'X509V3_EXT_I2V': too few arguments for call

自从 3.2.0 中添加了支持以来,发行说明没有提及任何有关 OpenSSL 的内容。但是,ActiveMQ-CPP 3.9.4 下载中包含的 README.txt 文件状态为:

If you wish to use the SSL Transport then you will need to have OpenSSL and its includes installed on your system. We recommend that you use version 1.0.0 or higher for best performance and security, but version from 0.9.8 are also known to work.

seems to indicate that my first error (see above) implies that OpenSSL 1.1.0 isn't supported by ActiveMQ-CPP. However, there doesn't appear to be an issue submitted on the ActiveMQ-CPP Jira site 关于缺少 OpenSSL 1.1.0 支持,他们自己的文档明确指出我应该可以使用 "version 1.0.0 or higher".

有谁知道ActiveMQ-CPP 3.9.4是否支持OpenSSL 1.1.0?

客户端不支持 ActiveMQ mailing lists 上报告的 OpenSSL 1.1.0。不过,我认为没有人愿意为此打开一个问题。

如果您安装了正确的 openssl 和开发库,RHEL8/OracleLinux8/Centos8 上的 v3.9.5 现在似乎可以正确编译。

https://activemq.apache.org/components/cms/download/395-release

yum 安装 openssl-devel apr apr-devel apr-util-openssl openssl-pkcs11

我是用 gcc-toolset-10 做的,但其他版本的 GCC 应该也可以。

我还安装了 ssl compat 库,但我认为这些不是必需的:compat-openssl10

安装的OpenSSL版本为:openssl-1.1.1g-15.el8_3.x86_64