You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2023/03/06 22:23:16 UTC

[trafficserver] branch 9.2.x updated: Fix SSLSessionDup for old OpenSSL and BoringSSL (#9444)

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

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


The following commit(s) were added to refs/heads/9.2.x by this push:
     new 88ba92047 Fix SSLSessionDup for old OpenSSL and BoringSSL (#9444)
88ba92047 is described below

commit 88ba92047ad858ffe352e9d30a3d8ad3fae4ace7
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Mon Feb 27 12:42:13 2023 -0700

    Fix SSLSessionDup for old OpenSSL and BoringSSL (#9444)
    
    (cherry picked from commit 3f6282128777b1467dceff3b2c2c8dd28d3f0ebf)
---
 iocore/net/SSLUtils.cc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc
index b1563cc44..5481bcb2b 100644
--- a/iocore/net/SSLUtils.cc
+++ b/iocore/net/SSLUtils.cc
@@ -2593,11 +2593,11 @@ SSLSessionDup(SSL_SESSION *sess)
     return nullptr;
   }
   uint8_t *buf = static_cast<uint8_t *>(alloca(len));
-  uint8_t **tmp = &buf;
+  uint8_t *tmp = buf;
 
-  i2d_SSL_SESSION(sess, tmp);
-  tmp = &buf;
-  if (d2i_SSL_SESSION(&duplicated, const_cast<const uint8_t **>(tmp), len) == nullptr) {
+  i2d_SSL_SESSION(sess, &tmp);
+  tmp = buf;
+  if (d2i_SSL_SESSION(&duplicated, const_cast<const uint8_t **>(&tmp), len) == nullptr) {
     return nullptr;
   }