Skip to content

Commit

Permalink
Fix build failure with LibreSSL
Browse files Browse the repository at this point in the history
The library can't be compiled with LibreSSL
since 1dc4ac9

RFC 7627 APIs were introduced in OpenSSL 1.1.0. This quick fix replaces
SSL_get_extms_support with a macro in versions that don't have it.

---

I license this contribution under the terms set out in the Unlicense
license.
  • Loading branch information
CyberTailor committed Apr 8, 2024
1 parent 65844dc commit 88349e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions c_src/fast_tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ typedef unsigned __int32 uint32_t;
#define DH_set0_pqg(dh, dh_p, param, dh_g) (dh)->p = dh_p; (dh)->g = dh_g
#endif

#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
#define SSL_get_extms_support(s) 0
#endif

#if OPENSSL_VERSION_NUMBER < 0x10002000L
#define SSL_is_server(s) (s)->server
#endif
Expand Down

0 comments on commit 88349e6

Please sign in to comment.