Skip to content

Commit c21cde9

Browse files
committed
fix build with libressl >= 3.5.0
Fix the following build failure with libressl >= 3.5.0: crypto-openssl-10.cpp:78:18: error: field 'ctx' has incomplete type 'HMAC_CTX' {aka 'hmac_ctx_st'} 78 | HMAC_CTX ctx; | ^~~ Fixes: - http://autobuild.buildroot.org/results/98747d470c2ad59280934e160d24bd3fdad1503c Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent a1e6311 commit c21cde9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

crypto-openssl-10.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@
2929
*/
3030

3131
#include <openssl/opensslconf.h>
32+
#include <openssl/opensslv.h>
3233

33-
#if !defined(OPENSSL_API_COMPAT)
34+
#if !defined(OPENSSL_API_COMPAT) && \
35+
!(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x30500000L)
3436

3537
#include "crypto.hpp"
3638
#include "key.hpp"

crypto-openssl-11.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@
2929
*/
3030

3131
#include <openssl/opensslconf.h>
32+
#include <openssl/opensslv.h>
3233

33-
#if defined(OPENSSL_API_COMPAT)
34+
#if defined(OPENSSL_API_COMPAT) || \
35+
(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x30500000L)
3436

3537
#include "crypto.hpp"
3638
#include "key.hpp"

0 commit comments

Comments
 (0)