You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2022/08/04 22:51:09 UTC

[trafficserver] branch 9.1.x updated: Set an appropriate callback function for OpenSSL3 (#8524)

This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch 9.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.1.x by this push:
     new d25abba46 Set an appropriate callback function for OpenSSL3 (#8524)
d25abba46 is described below

commit d25abba469a39a13b25d82e6d44036f5ac7fd2e2
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Sat Nov 27 17:19:13 2021 +0900

    Set an appropriate callback function for OpenSSL3 (#8524)
    
    (cherry picked from commit 796be32d21600ecad42c749fecd4404ed9b71d1e)
---
 iocore/net/SSLUtils.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc
index 13067cb31..2131d3e61 100644
--- a/iocore/net/SSLUtils.cc
+++ b/iocore/net/SSLUtils.cc
@@ -576,7 +576,11 @@ ssl_context_enable_tickets(SSL_CTX *ctx, const char *ticket_key_path)
   // Setting the callback can only fail if OpenSSL does not recognize the
   // SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB constant. we set the callback first
   // so that we don't leave a ticket_key pointer attached if it fails.
+#ifdef HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB
+  if (SSL_CTX_set_tlsext_ticket_key_evp_cb(ctx, ssl_callback_session_ticket) == 0) {
+#else
   if (SSL_CTX_set_tlsext_ticket_key_cb(ctx, ssl_callback_session_ticket) == 0) {
+#endif
     Error("failed to set session ticket callback");
     ticket_block_free(keyblock);
     return nullptr;