From d4c857694307c4658a015d246765c6200a5ba87d Mon Sep 17 00:00:00 2001 From: Lee Maguire Date: Tue, 24 Oct 2023 12:23:47 +0100 Subject: [PATCH] Implement BIO_CTRL_GET_KTLS_SEND and BIO_CTRL_GET_KTLS_RECV (#7078) --- CHANGELOG.md | 1 + src/realm/sync/network/network_ssl.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55ed0eb260f..c699ca18373 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ### Fixed * ([#????](https://github.com/realm/realm-core/issues/????), since v?.?.?) * Deleting an object in an asymmetric table would cause a crash. Likely to solve [#1537](https://github.com/realm/realm-kotlin/issues/1537), since v12.1.0. +* Implement BIO_CTRL_GET_KTLS_SEND and BIO_CTRL_GET_KTLS_RECV as OpenSSL versions < 3.0.4 depend on it. ### Breaking changes * Added separate enum for callback handler result values in the platform networking C API. ([PR #7015](https://github.com/realm/realm-core/pull/7015)) diff --git a/src/realm/sync/network/network_ssl.cpp b/src/realm/sync/network/network_ssl.cpp index 40840483fd8..58c2fcd960c 100644 --- a/src/realm/sync/network/network_ssl.cpp +++ b/src/realm/sync/network/network_ssl.cpp @@ -770,6 +770,11 @@ long Stream::bio_ctrl(BIO*, int cmd, long, void*) noexcept case BIO_CTRL_FLUSH: // Ignoring in alignment with `crypto/bio/bss_sock.c` of OpenSSL. return 1; +#if OPENSSL_VERSION_NUMBER >= 0x30000000L + case BIO_CTRL_GET_KTLS_SEND: + case BIO_CTRL_GET_KTLS_RECV: + return 0; +#endif default: REALM_ASSERT_EX(false, "Got BIO_ctrl with unknown command %d", cmd); }