You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2023/02/14 14:04:18 UTC
[tomcat] branch main updated: Regenerate with updated jextract
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 9def5c49d6 Regenerate with updated jextract
9def5c49d6 is described below
commit 9def5c49d679e75c280c20b23af693b2748833e1
Author: remm <re...@apache.org>
AuthorDate: Tue Feb 14 15:03:49 2023 +0100
Regenerate with updated jextract
Double check that there are no hidden changes.
---
.../apache/tomcat/util/openssl/Constants$root.java | 2 +-
.../apache/tomcat/util/openssl/RuntimeHelper.java | 10 ++++---
...va => SSL_CTX_set_cert_verify_callback$cb.java} | 32 ++++++++++++++--------
...ot.java => SSL_CTX_set_tmp_dh_callback$dh.java} | 32 ++++++++++++++--------
...nts$root.java => SSL_set_info_callback$cb.java} | 32 ++++++++++++++--------
.../apache/tomcat/util/openssl/constants$29.java | 2 +-
.../org/apache/tomcat/util/openssl/openssl_h.java | 2 +-
7 files changed, 69 insertions(+), 43 deletions(-)
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/Constants$root.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/Constants$root.java
index 5e154ba8b3..c4e5e9f4c2 100644
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/Constants$root.java
+++ b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/Constants$root.java
@@ -36,7 +36,7 @@ final class Constants$root {
static final OfLong C_LONG_LONG$LAYOUT = JAVA_LONG;
static final OfFloat C_FLOAT$LAYOUT = JAVA_FLOAT;
static final OfDouble C_DOUBLE$LAYOUT = JAVA_DOUBLE;
- static final OfAddress C_POINTER$LAYOUT = ADDRESS.withBitAlignment(64);
+ static final OfAddress C_POINTER$LAYOUT = ADDRESS.withBitAlignment(64).withTargetLayout(MemoryLayout.sequenceLayout(Constants$root.C_CHAR$LAYOUT));
}
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/RuntimeHelper.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/RuntimeHelper.java
index 2d67ac9dfa..8196a9a3dd 100644
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/RuntimeHelper.java
+++ b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/RuntimeHelper.java
@@ -19,12 +19,12 @@ package org.apache.tomcat.util.openssl;
// Generated by jextract
import java.lang.foreign.Linker;
-import java.lang.foreign.Arena;
import java.lang.foreign.FunctionDescriptor;
import java.lang.foreign.GroupLayout;
import java.lang.foreign.SymbolLookup;
import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemorySegment;
+import java.lang.foreign.Arena;
import java.lang.foreign.SegmentAllocator;
import java.lang.foreign.ValueLayout;
import java.lang.invoke.MethodHandle;
@@ -67,9 +67,11 @@ final class RuntimeHelper {
return obj;
}
- /*static MemorySegment lookupGlobalVariable(String name, MemoryLayout layout) {
- return SYMBOL_LOOKUP.find(name).map(symbol -> MemorySegment.ofAddress(symbol.address(), layout.byteSize(), symbol.scope())).orElse(null);
- }*/
+ static MemorySegment lookupGlobalVariable(String name, MemoryLayout layout) {
+ return SYMBOL_LOOKUP.find(name)
+ .map(s -> s.asUnbounded().asSlice(0, layout))
+ .orElse(null);
+ }
static MethodHandle downcallHandle(String name, FunctionDescriptor fdesc) {
return SYMBOL_LOOKUP.find(name).
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/Constants$root.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/SSL_CTX_set_cert_verify_callback$cb.java
similarity index 50%
copy from modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/Constants$root.java
copy to modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/SSL_CTX_set_cert_verify_callback$cb.java
index 5e154ba8b3..45b39d6a77 100644
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/Constants$root.java
+++ b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/SSL_CTX_set_cert_verify_callback$cb.java
@@ -24,19 +24,27 @@ import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
-final class Constants$root {
+/**
+ * {@snippet :
+ * int (*SSL_CTX_set_cert_verify_callback$cb)(X509_STORE_CTX*,void*);
+ * }
+ */
+public interface SSL_CTX_set_cert_verify_callback$cb {
- // Suppresses default constructor, ensuring non-instantiability.
- private Constants$root() {}
- static final OfBoolean C_BOOL$LAYOUT = JAVA_BOOLEAN;
- static final OfByte C_CHAR$LAYOUT = JAVA_BYTE;
- static final OfShort C_SHORT$LAYOUT = JAVA_SHORT;
- static final OfInt C_INT$LAYOUT = JAVA_INT;
- static final OfLong C_LONG$LAYOUT = JAVA_LONG;
- static final OfLong C_LONG_LONG$LAYOUT = JAVA_LONG;
- static final OfFloat C_FLOAT$LAYOUT = JAVA_FLOAT;
- static final OfDouble C_DOUBLE$LAYOUT = JAVA_DOUBLE;
- static final OfAddress C_POINTER$LAYOUT = ADDRESS.withBitAlignment(64);
+ int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1);
+ static MemorySegment allocate(SSL_CTX_set_cert_verify_callback$cb fi, Arena scope) {
+ return RuntimeHelper.upcallStub(SSL_CTX_set_cert_verify_callback$cb.class, fi, constants$15.SSL_CTX_set_cert_verify_callback$cb$FUNC, scope);
+ }
+ static SSL_CTX_set_cert_verify_callback$cb ofAddress(MemorySegment addr, Arena scope) {
+ MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope);
+ return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1) -> {
+ try {
+ return (int)constants$15.SSL_CTX_set_cert_verify_callback$cb$MH.invokeExact(symbol, __x0, __x1);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ };
+ }
}
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/Constants$root.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/SSL_CTX_set_tmp_dh_callback$dh.java
similarity index 50%
copy from modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/Constants$root.java
copy to modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/SSL_CTX_set_tmp_dh_callback$dh.java
index 5e154ba8b3..2ec933e3a5 100644
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/Constants$root.java
+++ b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/SSL_CTX_set_tmp_dh_callback$dh.java
@@ -24,19 +24,27 @@ import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
-final class Constants$root {
+/**
+ * {@snippet :
+ * DH* (*SSL_CTX_set_tmp_dh_callback$dh)(SSL*,int,int);
+ * }
+ */
+public interface SSL_CTX_set_tmp_dh_callback$dh {
- // Suppresses default constructor, ensuring non-instantiability.
- private Constants$root() {}
- static final OfBoolean C_BOOL$LAYOUT = JAVA_BOOLEAN;
- static final OfByte C_CHAR$LAYOUT = JAVA_BYTE;
- static final OfShort C_SHORT$LAYOUT = JAVA_SHORT;
- static final OfInt C_INT$LAYOUT = JAVA_INT;
- static final OfLong C_LONG$LAYOUT = JAVA_LONG;
- static final OfLong C_LONG_LONG$LAYOUT = JAVA_LONG;
- static final OfFloat C_FLOAT$LAYOUT = JAVA_FLOAT;
- static final OfDouble C_DOUBLE$LAYOUT = JAVA_DOUBLE;
- static final OfAddress C_POINTER$LAYOUT = ADDRESS.withBitAlignment(64);
+ java.lang.foreign.MemorySegment apply(java.lang.foreign.MemorySegment _x0, int _x1, int _x2);
+ static MemorySegment allocate(SSL_CTX_set_tmp_dh_callback$dh fi, Arena scope) {
+ return RuntimeHelper.upcallStub(SSL_CTX_set_tmp_dh_callback$dh.class, fi, constants$21.SSL_CTX_set_tmp_dh_callback$dh$FUNC, scope);
+ }
+ static SSL_CTX_set_tmp_dh_callback$dh ofAddress(MemorySegment addr, Arena scope) {
+ MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope);
+ return (java.lang.foreign.MemorySegment __x0, int __x1, int __x2) -> {
+ try {
+ return (java.lang.foreign.MemorySegment)constants$22.SSL_CTX_set_tmp_dh_callback$dh$MH.invokeExact(symbol, __x0, __x1, __x2);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ };
+ }
}
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/Constants$root.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/SSL_set_info_callback$cb.java
similarity index 53%
copy from modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/Constants$root.java
copy to modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/SSL_set_info_callback$cb.java
index 5e154ba8b3..2f8267cc81 100644
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/Constants$root.java
+++ b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/SSL_set_info_callback$cb.java
@@ -24,19 +24,27 @@ import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
-final class Constants$root {
+/**
+ * {@snippet :
+ * void (*SSL_set_info_callback$cb)(const SSL*,int,int);
+ * }
+ */
+public interface SSL_set_info_callback$cb {
- // Suppresses default constructor, ensuring non-instantiability.
- private Constants$root() {}
- static final OfBoolean C_BOOL$LAYOUT = JAVA_BOOLEAN;
- static final OfByte C_CHAR$LAYOUT = JAVA_BYTE;
- static final OfShort C_SHORT$LAYOUT = JAVA_SHORT;
- static final OfInt C_INT$LAYOUT = JAVA_INT;
- static final OfLong C_LONG$LAYOUT = JAVA_LONG;
- static final OfLong C_LONG_LONG$LAYOUT = JAVA_LONG;
- static final OfFloat C_FLOAT$LAYOUT = JAVA_FLOAT;
- static final OfDouble C_DOUBLE$LAYOUT = JAVA_DOUBLE;
- static final OfAddress C_POINTER$LAYOUT = ADDRESS.withBitAlignment(64);
+ void apply(java.lang.foreign.MemorySegment _x0, int _x1, int _x2);
+ static MemorySegment allocate(SSL_set_info_callback$cb fi, Arena scope) {
+ return RuntimeHelper.upcallStub(SSL_set_info_callback$cb.class, fi, constants$21.SSL_set_info_callback$cb$FUNC, scope);
+ }
+ static SSL_set_info_callback$cb ofAddress(MemorySegment addr, Arena scope) {
+ MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope);
+ return (java.lang.foreign.MemorySegment __x0, int __x1, int __x2) -> {
+ try {
+ constants$21.SSL_set_info_callback$cb$MH.invokeExact(symbol, __x0, __x1, __x2);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ };
+ }
}
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$29.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$29.java
index ee0f995484..a473a79cba 100644
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$29.java
+++ b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$29.java
@@ -28,7 +28,7 @@ final class constants$29 {
// Suppresses default constructor, ensuring non-instantiability.
private constants$29() {}
- static final MemorySegment OPENSSL_FILE$SEGMENT = RuntimeHelper.CONSTANT_ALLOCATOR.allocateUtf8String("/tmp/jextract$10207917738838814958.h");
+ static final MemorySegment OPENSSL_FILE$SEGMENT = RuntimeHelper.CONSTANT_ALLOCATOR.allocateUtf8String("/tmp/jextract$13590800042373814498.h");
}
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/openssl_h.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/openssl_h.java
index 0c1a6db5eb..558787b1b0 100644
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/openssl_h.java
+++ b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/openssl_h.java
@@ -3300,7 +3300,7 @@ public class openssl_h {
}
/**
* {@snippet :
- * #define OPENSSL_FILE "/tmp/jextract$10207917738838814958.h"
+ * #define OPENSSL_FILE "/tmp/jextract$13590800042373814498.h"
* }
*/
public static MemorySegment OPENSSL_FILE() {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org