]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add SSL_SESSION_is_resumable() implementation shim
authorArtem Boldariev <artem@boldariev.com>
Mon, 9 May 2022 16:08:29 +0000 (19:08 +0300)
committerArtem Boldariev <artem@boldariev.com>
Fri, 20 May 2022 17:17:48 +0000 (20:17 +0300)
This commit adds SSL_SESSION_is_resumable() implementation if it is
missing.

configure.ac
lib/isc/openssl_shim.c
lib/isc/openssl_shim.h

index 84108c9820c8e4fc275abb875837b62148280234..7b284ef6dae43732a9105c118b3b12843ac57f96 100644 (file)
@@ -667,6 +667,7 @@ AC_CHECK_FUNCS([SSL_CTX_up_ref])
 AC_CHECK_FUNCS([SSL_read_ex SSL_peek_ex SSL_write_ex])
 AC_CHECK_FUNCS([SSL_CTX_set1_cert_store X509_STORE_up_ref])
 AC_CHECK_FUNCS([SSL_CTX_up_ref])
+AC_CHECK_FUNCS([SSL_SESSION_is_resumable])
 
 #
 # Check for algorithm support in OpenSSL
index c39ba8c68270b46202c5342788c262dbc21d52e6..040fc68fbb3f98da71ad3d60588f09576cb212e1 100644 (file)
@@ -196,3 +196,11 @@ SSL_CTX_up_ref(SSL_CTX *ctx) {
        return (CRYPTO_add(&ctx->references, 1, CRYPTO_LOCK_SSL_CTX) > 0);
 }
 #endif /* !HAVE_SSL_CTX_UP_REF */
+
+#if !HAVE_SSL_SESSION_IS_RESUMABLE
+int
+SSL_SESSION_is_resumable(const SSL_SESSION *sess) {
+       return (!sess->not_resumable &&
+               (sess->session_id_length > 0 || sess->tlsext_ticklen > 0));
+}
+#endif /* HAVE_SSL_SESSION_IS_RESUMABLE */
index b2916e20a903325b3369c8b32c72de29e919c228..6b3a30b28851cb947dd0da1174d37414f611c8a2 100644 (file)
@@ -135,3 +135,8 @@ SSL_CTX_set1_cert_store(SSL_CTX *ctx, X509_STORE *store);
 int
 SSL_CTX_up_ref(SSL_CTX *store);
 #endif /* !HAVE_SSL_CTX_UP_REF */
+
+#if !HAVE_SSL_SESSION_IS_RESUMABLE
+int
+SSL_SESSION_is_resumable(const SSL_SESSION *s);
+#endif /* HAVE_SSL_SESSION_IS_RESUMABLE */