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

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
     new 0d51ce7ba8 Same but avoiding the visibility hack
0d51ce7ba8 is described below

commit 0d51ce7ba86cc9957bf76960bd07c2aee8830b4f
Author: remm <r...@apache.org>
AuthorDate: Fri Feb 23 13:11:21 2024 +0100

    Same but avoiding the visibility hack
---
 .../util/net/openssl/panama/OpenSSLContext.java      |  2 +-
 .../apache/tomcat/util/openssl/openssl_h_Macros.java | 20 ++++++++++----------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java 
b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
index 961d2a76cf..a2ce690c88 100644
--- a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
+++ b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
@@ -1081,7 +1081,7 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
                     // Set callback for DH parameters
                     SSL_CTX_set_tmp_dh_callback(state.sslCtx, 
SSL_CTX_set_tmp_dh_callback$dh.allocate(new TmpDHCallback(), contextArena));
                 } else {
-                    var d2i_ECPKParameters = 
openssl_h_Macros.findOrThrow("d2i_ECPKParameters");
+                    var d2i_ECPKParameters = 
openssl_h_Macros.d2i_ECPKParameters$SYMBOL();
                     var ecparams = PEM_ASN1_read_bio(d2i_ECPKParameters,
                             PEM_STRING_ECPARAMETERS(), certificateBIO, 
MemorySegment.NULL, MemorySegment.NULL, MemorySegment.NULL);
                     if (!MemorySegment.NULL.equals(ecparams)) {
diff --git a/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java 
b/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java
index acae96ac72..9472c312b4 100644
--- a/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java
+++ b/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java
@@ -28,16 +28,6 @@ import static org.apache.tomcat.util.openssl.openssl_h.*;
 public class openssl_h_Macros {
 
 
-    /**
-     * Publicly accessible find.
-     * @param symbol the symbol to find
-     * @return the symbol
-     */
-    public static MemorySegment findOrThrow(String symbol) {
-        return openssl_h.findOrThrow(symbol);
-    }
-
-
     /**
      * Set maximum protocol version on the given context.
      * {@snippet lang = c : # define SSL_CTX_set_max_proto_version(sslCtx, 
version) \
@@ -273,6 +263,7 @@ public class openssl_h_Macros {
         return X509_LOOKUP_ctrl(x509Lookup, X509_L_ADD_DIR(), name, 
X509_FILETYPE_PEM(), MemorySegment.NULL);
     }
 
+
     /**
      * Pass a file which will be loaded into the store.
      * {@snippet lang = c : # define X509_LOOKUP_load_file(x,name,type) \
@@ -289,5 +280,14 @@ public class openssl_h_Macros {
         return X509_LOOKUP_ctrl(x509Lookup, X509_L_FILE_LOAD(), name, 
X509_FILETYPE_PEM(), MemorySegment.NULL);
     }
 
+
+    /**
+     * Return the d2i_ECPKParameters symbol.
+     * @return the symbol
+     */
+    public static MemorySegment d2i_ECPKParameters$SYMBOL() {
+        return openssl_h.findOrThrow("d2i_ECPKParameters"); 
+    }
+
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to