Reputation: 4677
I am attempting to build the latest version of Apache ActiveMQ-CPP, which is 3.9.4. I have built both of the required dependencies, APR and OpenSSL. For OpenSSL, this is version 1.1.0f. I am able to build all 4 of the configurations without SSL support (Debug, DebugDLL, Release, ReleaseDLL). However, attempting to build anything with SSL support results in a number of errors:
..\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.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.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.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
The release notes haven't mentioned anything about OpenSSL since support was added in 3.2.0. However, the README.txt file included with the ActiveMQ-CPP 3.9.4 download states:
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.
This StackOverflow question 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 about lack of OpenSSL 1.1.0 support, and their own documentation clearly states that I should be able to use "version 1.0.0 or higher".
Does anyone know whether ActiveMQ-CPP 3.9.4 supports OpenSSL 1.1.0?
Upvotes: 1
Views: 995
Reputation: 694
It appears that v3.9.5 on RHEL8/OracleLinux8/Centos8 will now compile properly if you have the right openssl and devel libraries installed.
https://activemq.apache.org/components/cms/download/395-release
yum install openssl-devel apr apr-devel apr-util-openssl openssl-pkcs11
I did it with the gcc-toolset-10 but other versions of GCC should work as well.
I also had the ssl compat libraries installed but I don't believe those are necessary: compat-openssl10
Installed OpenSSL version is: openssl-1.1.1g-15.el8_3.x86_64
Upvotes: 0
Reputation: 18356
The client doesn't support OpenSSL 1.1.0 as reported on the ActiveMQ mailing lists. I don't think anyone bothered to open an issue to that effect though.
Upvotes: 2