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/12/06 10:14:41 UTC
(tomcat) branch 9.0.x updated: Sync jextract generated sources
This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 79f1662f4d Sync jextract generated sources
79f1662f4d is described below
commit 79f1662f4d426caa362a866b63ae8fd52778ee42
Author: remm <re...@apache.org>
AuthorDate: Tue Dec 5 15:52:06 2023 +0100
Sync jextract generated sources
---
.../apache/tomcat/util/openssl/RuntimeHelper.java | 263 --
.../SSL_CTX_set_cert_verify_callback$cb.java | 50 -
.../openssl/SSL_CTX_set_tmp_dh_callback$dh.java | 50 -
.../util/openssl/SSL_set_info_callback$cb.java | 50 -
.../apache/tomcat/util/openssl/constants$0.java | 53 -
.../apache/tomcat/util/openssl/constants$1.java | 56 -
.../apache/tomcat/util/openssl/constants$10.java | 60 -
.../apache/tomcat/util/openssl/constants$11.java | 57 -
.../apache/tomcat/util/openssl/constants$12.java | 58 -
.../apache/tomcat/util/openssl/constants$13.java | 63 -
.../apache/tomcat/util/openssl/constants$14.java | 57 -
.../apache/tomcat/util/openssl/constants$15.java | 58 -
.../apache/tomcat/util/openssl/constants$16.java | 57 -
.../apache/tomcat/util/openssl/constants$17.java | 57 -
.../apache/tomcat/util/openssl/constants$18.java | 62 -
.../apache/tomcat/util/openssl/constants$19.java | 57 -
.../apache/tomcat/util/openssl/constants$2.java | 53 -
.../apache/tomcat/util/openssl/constants$20.java | 53 -
.../apache/tomcat/util/openssl/constants$21.java | 57 -
.../apache/tomcat/util/openssl/constants$22.java | 57 -
.../apache/tomcat/util/openssl/constants$23.java | 57 -
.../apache/tomcat/util/openssl/constants$24.java | 57 -
.../apache/tomcat/util/openssl/constants$25.java | 58 -
.../apache/tomcat/util/openssl/constants$26.java | 54 -
.../apache/tomcat/util/openssl/constants$27.java | 51 -
.../apache/tomcat/util/openssl/constants$28.java | 57 -
.../apache/tomcat/util/openssl/constants$29.java | 57 -
.../apache/tomcat/util/openssl/constants$3.java | 60 -
.../apache/tomcat/util/openssl/constants$30.java | 54 -
.../apache/tomcat/util/openssl/constants$31.java | 60 -
.../apache/tomcat/util/openssl/constants$32.java | 59 -
.../apache/tomcat/util/openssl/constants$33.java | 57 -
.../apache/tomcat/util/openssl/constants$34.java | 57 -
.../apache/tomcat/util/openssl/constants$35.java | 51 -
.../apache/tomcat/util/openssl/constants$4.java | 63 -
.../apache/tomcat/util/openssl/constants$5.java | 57 -
.../apache/tomcat/util/openssl/constants$6.java | 62 -
.../apache/tomcat/util/openssl/constants$7.java | 56 -
.../apache/tomcat/util/openssl/constants$8.java | 58 -
.../apache/tomcat/util/openssl/constants$9.java | 59 -
.../org/apache/tomcat/util/openssl/openssl_h.java | 4565 ++++++++++++++------
.../util/openssl/openssl_h_Compatibility.java | 77 +-
.../tomcat/util/openssl/openssl_h_Macros.java | 445 +-
43 files changed, 3600 insertions(+), 3959 deletions(-)
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
deleted file mode 100644
index 3692c2f969..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/RuntimeHelper.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.tomcat.util.openssl;
-// Generated by jextract
-
-import java.lang.foreign.Linker;
-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;
-import java.lang.invoke.MethodHandles;
-import java.lang.invoke.MethodType;
-import java.io.File;
-import java.nio.file.Path;
-import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-import java.util.Optional;
-import java.util.stream.Stream;
-
-import java.lang.foreign.AddressLayout;
-import java.lang.foreign.MemoryLayout;
-
-import static java.lang.foreign.Linker.*;
-import static java.lang.foreign.ValueLayout.*;
-import static java.lang.Long.MAX_VALUE;
-
-final class RuntimeHelper {
-
- private static final Linker LINKER = Linker.nativeLinker();
- private static final ClassLoader LOADER = RuntimeHelper.class.getClassLoader();
- private static final MethodHandles.Lookup MH_LOOKUP = MethodHandles.lookup();
- private static final SymbolLookup SYMBOL_LOOKUP;
- private static final SegmentAllocator THROWING_ALLOCATOR = (x, y) -> { throw new AssertionError("should not reach here"); };
- static final AddressLayout POINTER = ValueLayout.ADDRESS.withTargetLayout(MemoryLayout.sequenceLayout(MAX_VALUE, JAVA_BYTE));
-
- final static SegmentAllocator CONSTANT_ALLOCATOR =
- (size, align) -> Arena.ofAuto().allocate(size, align);
-
- static {
- System.loadLibrary("ssl");
- SymbolLookup loaderLookup = SymbolLookup.loaderLookup();
- SYMBOL_LOOKUP = name -> loaderLookup.find(name).or(() -> LINKER.defaultLookup().find(name));
- }
-
- // Suppresses default constructor, ensuring non-instantiability.
- private RuntimeHelper() {}
-
- static <T> T requireNonNull(T obj, String symbolName) {
- if (obj == null) {
- throw new UnsatisfiedLinkError("unresolved symbol: " + symbolName);
- }
- return obj;
- }
-
- static MemorySegment lookupGlobalVariable(String name, MemoryLayout layout) {
- return SYMBOL_LOOKUP.find(name)
- .map(s -> s.reinterpret(layout.byteSize()))
- .orElse(null);
- }
-
- static MethodHandle downcallHandle(String name, FunctionDescriptor fdesc) {
- return SYMBOL_LOOKUP.find(name).
- map(addr -> LINKER.downcallHandle(addr, fdesc)).
- orElse(null);
- }
-
- static MethodHandle downcallHandle(FunctionDescriptor fdesc) {
- return LINKER.downcallHandle(fdesc);
- }
-
- static MethodHandle downcallHandleVariadic(String name, FunctionDescriptor fdesc) {
- return SYMBOL_LOOKUP.find(name).
- map(addr -> VarargsInvoker.make(addr, fdesc)).
- orElse(null);
- }
-
- static MethodHandle upcallHandle(Class<?> fi, String name, FunctionDescriptor fdesc) {
- try {
- return MH_LOOKUP.findVirtual(fi, name, fdesc.toMethodType());
- } catch (Throwable ex) {
- throw new AssertionError(ex);
- }
- }
-
- static <Z> MemorySegment upcallStub(MethodHandle fiHandle, Z z, FunctionDescriptor fdesc, Arena scope) {
- try {
- fiHandle = fiHandle.bindTo(z);
- return LINKER.upcallStub(fiHandle, fdesc, scope);
- } catch (Throwable ex) {
- throw new AssertionError(ex);
- }
- }
-
- static MemorySegment asArray(MemorySegment addr, MemoryLayout layout, int numElements, Arena arena) {
- return addr.reinterpret(numElements * layout.byteSize(), arena, null);
- }
-
- // Internals only below this point
-
- private static final class VarargsInvoker {
- private static final MethodHandle INVOKE_MH;
- private final MemorySegment symbol;
- private final FunctionDescriptor function;
-
- private VarargsInvoker(MemorySegment symbol, FunctionDescriptor function) {
- this.symbol = symbol;
- this.function = function;
- }
-
- static {
- try {
- INVOKE_MH = MethodHandles.lookup().findVirtual(VarargsInvoker.class, "invoke", MethodType.methodType(Object.class, SegmentAllocator.class, Object[].class));
- } catch (ReflectiveOperationException e) {
- throw new RuntimeException(e);
- }
- }
-
- static MethodHandle make(MemorySegment symbol, FunctionDescriptor function) {
- VarargsInvoker invoker = new VarargsInvoker(symbol, function);
- MethodHandle handle = INVOKE_MH.bindTo(invoker).asCollector(Object[].class, function.argumentLayouts().size() + 1);
- MethodType mtype = MethodType.methodType(function.returnLayout().isPresent() ? carrier(function.returnLayout().get(), true) : void.class);
- for (MemoryLayout layout : function.argumentLayouts()) {
- mtype = mtype.appendParameterTypes(carrier(layout, false));
- }
- mtype = mtype.appendParameterTypes(Object[].class);
- boolean needsAllocator = function.returnLayout().isPresent() &&
- function.returnLayout().get() instanceof GroupLayout;
- if (needsAllocator) {
- mtype = mtype.insertParameterTypes(0, SegmentAllocator.class);
- } else {
- handle = MethodHandles.insertArguments(handle, 0, THROWING_ALLOCATOR);
- }
- return handle.asType(mtype);
- }
-
- static Class<?> carrier(MemoryLayout layout, boolean ret) {
- if (layout instanceof ValueLayout valueLayout) {
- return valueLayout.carrier();
- } else if (layout instanceof GroupLayout) {
- return MemorySegment.class;
- } else {
- throw new AssertionError("Cannot get here!");
- }
- }
-
- private Object invoke(SegmentAllocator allocator, Object[] args) throws Throwable {
- // one trailing Object[]
- int nNamedArgs = function.argumentLayouts().size();
- assert(args.length == nNamedArgs + 1);
- // The last argument is the array of vararg collector
- Object[] unnamedArgs = (Object[]) args[args.length - 1];
-
- int argsCount = nNamedArgs + unnamedArgs.length;
- Class<?>[] argTypes = new Class<?>[argsCount];
- MemoryLayout[] argLayouts = new MemoryLayout[nNamedArgs + unnamedArgs.length];
-
- int pos = 0;
- for (pos = 0; pos < nNamedArgs; pos++) {
- argLayouts[pos] = function.argumentLayouts().get(pos);
- }
-
- assert pos == nNamedArgs;
- for (Object o: unnamedArgs) {
- argLayouts[pos] = variadicLayout(normalize(o.getClass()));
- pos++;
- }
- assert pos == argsCount;
-
- FunctionDescriptor f = (function.returnLayout().isEmpty()) ?
- FunctionDescriptor.ofVoid(argLayouts) :
- FunctionDescriptor.of(function.returnLayout().get(), argLayouts);
- MethodHandle mh = LINKER.downcallHandle(symbol, f);
- boolean needsAllocator = function.returnLayout().isPresent() &&
- function.returnLayout().get() instanceof GroupLayout;
- if (needsAllocator) {
- mh = mh.bindTo(allocator);
- }
- // flatten argument list so that it can be passed to an asSpreader MH
- Object[] allArgs = new Object[nNamedArgs + unnamedArgs.length];
- System.arraycopy(args, 0, allArgs, 0, nNamedArgs);
- System.arraycopy(unnamedArgs, 0, allArgs, nNamedArgs, unnamedArgs.length);
-
- return mh.asSpreader(Object[].class, argsCount).invoke(allArgs);
- }
-
- private static Class<?> unboxIfNeeded(Class<?> clazz) {
- if (clazz == Boolean.class) {
- return boolean.class;
- } else if (clazz == Void.class) {
- return void.class;
- } else if (clazz == Byte.class) {
- return byte.class;
- } else if (clazz == Character.class) {
- return char.class;
- } else if (clazz == Short.class) {
- return short.class;
- } else if (clazz == Integer.class) {
- return int.class;
- } else if (clazz == Long.class) {
- return long.class;
- } else if (clazz == Float.class) {
- return float.class;
- } else if (clazz == Double.class) {
- return double.class;
- } else {
- return clazz;
- }
- }
-
- private Class<?> promote(Class<?> c) {
- if (c == byte.class || c == char.class || c == short.class || c == int.class) {
- return long.class;
- } else if (c == float.class) {
- return double.class;
- } else {
- return c;
- }
- }
-
- private Class<?> normalize(Class<?> c) {
- c = unboxIfNeeded(c);
- if (c.isPrimitive()) {
- return promote(c);
- }
- if (c == MemorySegment.class) {
- return MemorySegment.class;
- }
- throw new IllegalArgumentException("Invalid type for ABI: " + c.getTypeName());
- }
-
- private MemoryLayout variadicLayout(Class<?> c) {
- if (c == long.class) {
- return JAVA_LONG;
- } else if (c == double.class) {
- return JAVA_DOUBLE;
- } else if (c == MemorySegment.class) {
- return ADDRESS;
- } else {
- throw new IllegalArgumentException("Unhandled variadic argument class: " + c);
- }
- }
- }
-}
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/SSL_CTX_set_cert_verify_callback$cb.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/SSL_CTX_set_cert_verify_callback$cb.java
deleted file mode 100644
index 1481886497..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/SSL_CTX_set_cert_verify_callback$cb.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-/**
- * {@snippet :
- * int (*SSL_CTX_set_cert_verify_callback$cb)(X509_STORE_CTX*,void*);
- * }
- */
-public interface SSL_CTX_set_cert_verify_callback$cb {
-
- 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(constants$20.const$2, fi, constants$12.const$2, scope);
- }
- static SSL_CTX_set_cert_verify_callback$cb ofAddress(MemorySegment addr, Arena arena) {
- MemorySegment symbol = addr.reinterpret(arena, null);
- return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1) -> {
- try {
- return (int)constants$20.const$3.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/SSL_CTX_set_tmp_dh_callback$dh.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/SSL_CTX_set_tmp_dh_callback$dh.java
deleted file mode 100644
index 40cfbf4fed..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/SSL_CTX_set_tmp_dh_callback$dh.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-/**
- * {@snippet :
- * DH* (*SSL_CTX_set_tmp_dh_callback$dh)(SSL*,int,int);
- * }
- */
-public interface SSL_CTX_set_tmp_dh_callback$dh {
-
- 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(constants$27.const$3, fi, constants$27.const$2, scope);
- }
- static SSL_CTX_set_tmp_dh_callback$dh ofAddress(MemorySegment addr, Arena arena) {
- MemorySegment symbol = addr.reinterpret(arena, null);
- return (java.lang.foreign.MemorySegment __x0, int __x1, int __x2) -> {
- try {
- return (java.lang.foreign.MemorySegment)constants$27.const$4.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/SSL_set_info_callback$cb.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/SSL_set_info_callback$cb.java
deleted file mode 100644
index 4c5bf9c30b..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/SSL_set_info_callback$cb.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-/**
- * {@snippet :
- * void (*SSL_set_info_callback$cb)(const SSL*,int,int);
- * }
- */
-public interface SSL_set_info_callback$cb {
-
- 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(constants$26.const$1, fi, constants$26.const$0, scope);
- }
- static SSL_set_info_callback$cb ofAddress(MemorySegment addr, Arena arena) {
- MemorySegment symbol = addr.reinterpret(arena, null);
- return (java.lang.foreign.MemorySegment __x0, int __x1, int __x2) -> {
- try {
- constants$26.const$2.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$0.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$0.java
deleted file mode 100644
index 410f106585..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$0.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$0 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$0() {}
- static final FunctionDescriptor const$0 = FunctionDescriptor.of(JAVA_INT,
- RuntimeHelper.POINTER
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "OPENSSL_sk_num",
- constants$0.const$0
- );
- static final FunctionDescriptor const$2 = FunctionDescriptor.of(RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- JAVA_INT
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "OPENSSL_sk_value",
- constants$0.const$2
- );
- static final FunctionDescriptor const$4 = FunctionDescriptor.of(JAVA_LONG);
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "OpenSSL_version_num",
- constants$0.const$4
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$1.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$1.java
deleted file mode 100644
index ddbf364b6e..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$1.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$1 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$1() {}
- static final FunctionDescriptor const$0 = FunctionDescriptor.of(RuntimeHelper.POINTER,
- JAVA_INT
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "OpenSSL_version",
- constants$1.const$0
- );
- static final FunctionDescriptor const$2 = FunctionDescriptor.ofVoid(
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- JAVA_INT
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "CRYPTO_free",
- constants$1.const$2
- );
- static final FunctionDescriptor const$4 = FunctionDescriptor.of(JAVA_LONG,
- RuntimeHelper.POINTER
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "BIO_ctrl_pending",
- constants$1.const$4
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$10.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$10.java
deleted file mode 100644
index f10795ab8d..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$10.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$10 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$10() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "X509_LOOKUP_hash_dir",
- constants$2.const$0
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "X509_LOOKUP_file",
- constants$2.const$0
- );
- static final FunctionDescriptor const$2 = FunctionDescriptor.of(JAVA_INT,
- RuntimeHelper.POINTER,
- JAVA_INT,
- RuntimeHelper.POINTER,
- JAVA_LONG,
- RuntimeHelper.POINTER
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "X509_LOOKUP_ctrl",
- constants$10.const$2
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "X509_STORE_CTX_get_ex_data",
- constants$0.const$2
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "X509_STORE_CTX_get_error",
- constants$0.const$0
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$11.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$11.java
deleted file mode 100644
index 8e7c6cedfe..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$11.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$11 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$11() {}
- static final FunctionDescriptor const$0 = FunctionDescriptor.ofVoid(
- RuntimeHelper.POINTER,
- JAVA_INT
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "X509_STORE_CTX_set_error",
- constants$11.const$0
- );
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- "X509_STORE_CTX_get_error_depth",
- constants$0.const$0
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "X509_STORE_CTX_get_current_cert",
- constants$2.const$4
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "X509_STORE_CTX_get0_current_issuer",
- constants$2.const$4
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "d2i_X509_bio",
- constants$2.const$2
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$12.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$12.java
deleted file mode 100644
index 6f13245ee9..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$12.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$12 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$12() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "X509_free",
- constants$7.const$0
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "d2i_X509",
- constants$8.const$1
- );
- static final FunctionDescriptor const$2 = FunctionDescriptor.of(JAVA_INT,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "i2d_X509",
- constants$12.const$2
- );
- static final FunctionDescriptor const$4 = FunctionDescriptor.of(JAVA_INT,
- RuntimeHelper.POINTER,
- JAVA_INT,
- JAVA_INT
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "X509_get_ext_by_NID",
- constants$12.const$4
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$13.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$13.java
deleted file mode 100644
index ef36a686a1..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$13.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$13 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$13() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "X509_get_ext",
- constants$0.const$2
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "X509_EXTENSION_get_data",
- constants$2.const$4
- );
- static final FunctionDescriptor const$2 = FunctionDescriptor.of(RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "PEM_ASN1_read_bio",
- constants$13.const$2
- );
- static final FunctionDescriptor const$4 = FunctionDescriptor.of(RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "PEM_read_bio_X509_AUX",
- constants$13.const$4
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$14.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$14.java
deleted file mode 100644
index 660a7c50b4..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$14.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$14 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$14() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "PEM_read_bio_ECPKParameters",
- constants$13.const$4
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "PEM_read_bio_DHparams",
- constants$13.const$4
- );
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- "PEM_read_bio_PrivateKey",
- constants$13.const$4
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "PEM_read_bio_Parameters",
- constants$2.const$2
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "SSL_CTX_get_options",
- constants$1.const$4
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "SSL_get_options",
- constants$1.const$4
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$15.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$15.java
deleted file mode 100644
index bfefee03e4..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$15.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$15 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$15() {}
- static final FunctionDescriptor const$0 = FunctionDescriptor.of(JAVA_LONG,
- RuntimeHelper.POINTER,
- JAVA_LONG
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "SSL_CTX_clear_options",
- constants$15.const$0
- );
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- "SSL_CTX_set_options",
- constants$15.const$0
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "SSL_set_options",
- constants$15.const$0
- );
- static final FunctionDescriptor const$4 = FunctionDescriptor.ofVoid(
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "SSL_CTX_set_alpn_select_cb",
- constants$15.const$4
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$16.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$16.java
deleted file mode 100644
index 99e4b8a1c5..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$16.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$16 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$16() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "SSL_get0_alpn_selected",
- constants$15.const$4
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "SSL_in_init",
- constants$0.const$0
- );
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- "SSL_CTX_set0_tmp_dh_pkey",
- constants$12.const$2
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "SSL_CTX_set_cipher_list",
- constants$12.const$2
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "SSL_CTX_new",
- constants$2.const$4
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "SSL_CTX_free",
- constants$7.const$0
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$17.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$17.java
deleted file mode 100644
index 04f7d444b4..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$17.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$17 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$17() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "SSL_CTX_set_timeout",
- constants$15.const$0
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "SSL_CTX_get_timeout",
- constants$1.const$4
- );
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- "SSL_CTX_get_cert_store",
- constants$2.const$4
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "SSL_get_current_cipher",
- constants$2.const$4
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "SSL_CIPHER_get_name",
- constants$2.const$4
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "SSL_CIPHER_get_kx_nid",
- constants$0.const$0
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$18.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$18.java
deleted file mode 100644
index 9ec00bcc15..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$18.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$18 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$18() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "SSL_CIPHER_get_auth_nid",
- constants$0.const$0
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "SSL_pending",
- constants$0.const$0
- );
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- "SSL_set_bio",
- constants$15.const$4
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "SSL_set_cipher_list",
- constants$12.const$2
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "SSL_CTX_set_ciphersuites",
- constants$12.const$2
- );
- static final FunctionDescriptor const$5 = FunctionDescriptor.ofVoid(
- RuntimeHelper.POINTER,
- JAVA_INT,
- RuntimeHelper.POINTER
- );
- static final MethodHandle const$6 = RuntimeHelper.downcallHandle(
- "SSL_set_verify",
- constants$18.const$5
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$19.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$19.java
deleted file mode 100644
index 62022f78b2..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$19.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$19 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$19() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "SSL_CTX_use_certificate_chain_file",
- constants$12.const$2
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "SSL_load_client_CA_file",
- constants$2.const$4
- );
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- "SSL_add_file_cert_subjects_to_stack",
- constants$12.const$2
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "SSL_SESSION_get_time",
- constants$1.const$4
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "SSL_SESSION_get_id",
- constants$2.const$2
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "SSL_get1_peer_certificate",
- constants$2.const$4
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$2.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$2.java
deleted file mode 100644
index a79e9d6f59..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$2.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$2 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$2() {}
- static final FunctionDescriptor const$0 = FunctionDescriptor.of(RuntimeHelper.POINTER);
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "BIO_s_file",
- constants$2.const$0
- );
- static final FunctionDescriptor const$2 = FunctionDescriptor.of(RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "BIO_new_file",
- constants$2.const$2
- );
- static final FunctionDescriptor const$4 = FunctionDescriptor.of(RuntimeHelper.POINTER,
- RuntimeHelper.POINTER
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "BIO_new",
- constants$2.const$4
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$20.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$20.java
deleted file mode 100644
index 0a92c930fa..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$20.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$20 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$20() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "SSL_get_peer_cert_chain",
- constants$2.const$4
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "SSL_CTX_set_verify",
- constants$18.const$5
- );
- static final MethodHandle const$2 = RuntimeHelper.upcallHandle(SSL_CTX_set_cert_verify_callback$cb.class, "apply", constants$12.const$2);
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- constants$12.const$2
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "SSL_CTX_set_cert_verify_callback",
- constants$15.const$4
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "SSL_CTX_use_PrivateKey",
- constants$12.const$2
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$21.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$21.java
deleted file mode 100644
index 715c12838f..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$21.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$21 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$21() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "SSL_CTX_use_certificate",
- constants$12.const$2
- );
- static final FunctionDescriptor const$1 = FunctionDescriptor.ofVoid(
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER
- );
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- "SSL_CTX_set_default_passwd_cb",
- constants$21.const$1
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "SSL_CTX_check_private_key",
- constants$0.const$0
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "SSL_CTX_set_session_id_context",
- constants$3.const$1
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "SSL_new",
- constants$2.const$4
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$22.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$22.java
deleted file mode 100644
index c3bfdc4d1a..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$22.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$22 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$22() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "SSL_free",
- constants$7.const$0
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "SSL_read",
- constants$3.const$1
- );
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- "SSL_write",
- constants$3.const$1
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "SSL_CTX_ctrl",
- constants$3.const$4
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "SSL_get_version",
- constants$2.const$4
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "TLS_server_method",
- constants$2.const$0
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$23.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$23.java
deleted file mode 100644
index a3c2c34035..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$23.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$23 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$23() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "SSL_get_ciphers",
- constants$2.const$4
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "SSL_CTX_get_ciphers",
- constants$2.const$4
- );
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- "SSL_do_handshake",
- constants$0.const$0
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "SSL_renegotiate",
- constants$0.const$0
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "SSL_renegotiate_pending",
- constants$0.const$0
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "SSL_shutdown",
- constants$0.const$0
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$24.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$24.java
deleted file mode 100644
index dd6b63e237..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$24.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$24 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$24() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "SSL_verify_client_post_handshake",
- constants$0.const$0
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "SSL_CTX_set_client_CA_list",
- constants$21.const$1
- );
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- "SSL_CTX_get_client_CA_list",
- constants$2.const$4
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "SSL_CTX_add_client_CA",
- constants$12.const$2
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "SSL_set_connect_state",
- constants$7.const$0
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "SSL_set_accept_state",
- constants$7.const$0
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$25.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$25.java
deleted file mode 100644
index 4682192b3b..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$25.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$25 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$25() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "SSL_get_privatekey",
- constants$2.const$4
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "SSL_get_shutdown",
- constants$0.const$0
- );
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- "SSL_CTX_set_default_verify_paths",
- constants$0.const$0
- );
- static final FunctionDescriptor const$3 = FunctionDescriptor.of(JAVA_INT,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "SSL_CTX_load_verify_locations",
- constants$25.const$3
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "SSL_get_session",
- constants$2.const$4
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$26.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$26.java
deleted file mode 100644
index 7ab98b1d61..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$26.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$26 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$26() {}
- static final FunctionDescriptor const$0 = FunctionDescriptor.ofVoid(
- RuntimeHelper.POINTER,
- JAVA_INT,
- JAVA_INT
- );
- static final MethodHandle const$1 = RuntimeHelper.upcallHandle(SSL_set_info_callback$cb.class, "apply", constants$26.const$0);
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- constants$26.const$0
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "SSL_set_info_callback",
- constants$21.const$1
- );
- static final FunctionDescriptor const$4 = FunctionDescriptor.ofVoid(
- RuntimeHelper.POINTER,
- JAVA_LONG
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "SSL_set_verify_result",
- constants$26.const$4
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$27.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$27.java
deleted file mode 100644
index d2eb7c2797..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$27.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$27 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$27() {}
- static final FunctionDescriptor const$0 = FunctionDescriptor.of(JAVA_INT);
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "SSL_get_ex_data_X509_STORE_CTX_idx",
- constants$27.const$0
- );
- static final FunctionDescriptor const$2 = FunctionDescriptor.of(RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- JAVA_INT,
- JAVA_INT
- );
- static final MethodHandle const$3 = RuntimeHelper.upcallHandle(SSL_CTX_set_tmp_dh_callback$dh.class, "apply", constants$27.const$2);
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- constants$27.const$2
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "SSL_CTX_set_tmp_dh_callback",
- constants$21.const$1
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$28.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$28.java
deleted file mode 100644
index bf8ec2da92..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$28.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$28 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$28() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "SSL_CONF_CTX_new",
- constants$2.const$0
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "SSL_CONF_CTX_finish",
- constants$0.const$0
- );
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- "SSL_CONF_CTX_free",
- constants$7.const$0
- );
- static final FunctionDescriptor const$3 = FunctionDescriptor.of(JAVA_INT,
- RuntimeHelper.POINTER,
- JAVA_INT
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "SSL_CONF_CTX_set_flags",
- constants$28.const$3
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "SSL_CONF_CTX_set_ssl_ctx",
- constants$21.const$1
- );
-}
-
-
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
deleted file mode 100644
index 077f9f7d55..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$29.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$29 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$29() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "SSL_CONF_cmd",
- constants$25.const$3
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "SSL_CONF_cmd_value_type",
- constants$12.const$2
- );
- static final FunctionDescriptor const$2 = FunctionDescriptor.of(JAVA_INT,
- JAVA_LONG,
- RuntimeHelper.POINTER
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "OPENSSL_init_ssl",
- constants$29.const$2
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "ERR_get_error",
- constants$0.const$4
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "ERR_peek_last_error",
- constants$0.const$4
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$3.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$3.java
deleted file mode 100644
index 6c7c4871b9..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$3.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$3 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$3() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "BIO_free",
- constants$0.const$0
- );
- static final FunctionDescriptor const$1 = FunctionDescriptor.of(JAVA_INT,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- JAVA_INT
- );
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- "BIO_read",
- constants$3.const$1
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "BIO_write",
- constants$3.const$1
- );
- static final FunctionDescriptor const$4 = FunctionDescriptor.of(JAVA_LONG,
- RuntimeHelper.POINTER,
- JAVA_INT,
- JAVA_LONG,
- RuntimeHelper.POINTER
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "BIO_ctrl",
- constants$3.const$4
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$30.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$30.java
deleted file mode 100644
index b3de4894fa..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$30.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$30 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$30() {}
- static final FunctionDescriptor const$0 = FunctionDescriptor.ofVoid();
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "ERR_clear_error",
- constants$30.const$0
- );
- static final FunctionDescriptor const$2 = FunctionDescriptor.of(RuntimeHelper.POINTER,
- JAVA_LONG,
- RuntimeHelper.POINTER
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "ERR_error_string",
- constants$30.const$2
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "PKCS12_verify_mac",
- constants$3.const$1
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "PKCS12_free",
- constants$7.const$0
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$31.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$31.java
deleted file mode 100644
index 23f0bf272b..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$31.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$31 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$31() {}
- static final FunctionDescriptor const$0 = FunctionDescriptor.of(JAVA_INT,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "PKCS12_parse",
- constants$31.const$0
- );
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- "d2i_PKCS12_bio",
- constants$2.const$2
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "RAND_seed",
- constants$11.const$0
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "RAND_load_file",
- constants$4.const$5
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "X509_check_issued",
- constants$12.const$2
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$32.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$32.java
deleted file mode 100644
index c30ba0a836..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$32.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$32 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$32() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "ENGINE_by_id",
- constants$2.const$4
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "ENGINE_register_all_complete",
- constants$27.const$0
- );
- static final FunctionDescriptor const$2 = FunctionDescriptor.of(JAVA_INT,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- JAVA_INT
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "ENGINE_ctrl_cmd_string",
- constants$32.const$2
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "ENGINE_free",
- constants$0.const$0
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "ENGINE_load_private_key",
- constants$13.const$4
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$33.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$33.java
deleted file mode 100644
index e559cf6f31..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$33.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$33 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$33() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "ENGINE_set_default",
- constants$28.const$3
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "OCSP_cert_to_id",
- constants$6.const$5
- );
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- "OCSP_request_add0_id",
- constants$2.const$2
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "OCSP_response_status",
- constants$0.const$0
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "OCSP_response_get1_basic",
- constants$2.const$4
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "OCSP_resp_get0",
- constants$0.const$2
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$34.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$34.java
deleted file mode 100644
index 7678dc845d..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$34.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$34 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$34() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "OCSP_resp_find",
- constants$3.const$1
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "OCSP_single_get0_status",
- constants$31.const$0
- );
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- "OCSP_BASICRESP_free",
- constants$7.const$0
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "OCSP_RESPONSE_free",
- constants$7.const$0
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "d2i_OCSP_RESPONSE",
- constants$8.const$1
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "OCSP_CERTID_free",
- constants$7.const$0
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$35.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$35.java
deleted file mode 100644
index 25fd02cdff..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$35.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$35 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$35() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "OCSP_REQUEST_new",
- constants$2.const$0
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "OCSP_REQUEST_free",
- constants$7.const$0
- );
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- "i2d_OCSP_REQUEST",
- constants$12.const$2
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "OSSL_PROVIDER_get0_name",
- constants$2.const$4
- );
- static final MemorySegment const$4 = RuntimeHelper.CONSTANT_ALLOCATOR.allocateFrom("/tmp/jextract$5612544175128132323.h");
- static final MemorySegment const$5 = RuntimeHelper.CONSTANT_ALLOCATOR.allocateFrom("EC PARAMETERS");
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$4.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$4.java
deleted file mode 100644
index d5ccaecc3f..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$4.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$4 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$4() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "BIO_s_mem",
- constants$2.const$0
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "BIO_s_bio",
- constants$2.const$0
- );
- static final FunctionDescriptor const$2 = FunctionDescriptor.of(JAVA_INT,
- RuntimeHelper.POINTER,
- JAVA_LONG,
- RuntimeHelper.POINTER,
- JAVA_LONG
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "BIO_new_bio_pair",
- constants$4.const$2
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "BN_new",
- constants$2.const$0
- );
- static final FunctionDescriptor const$5 = FunctionDescriptor.of(JAVA_INT,
- RuntimeHelper.POINTER,
- JAVA_LONG
- );
- static final MethodHandle const$6 = RuntimeHelper.downcallHandle(
- "BN_set_word",
- constants$4.const$5
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$5.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$5.java
deleted file mode 100644
index 573b791a64..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$5.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$5 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$5() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "BN_get_rfc2409_prime_768",
- constants$2.const$4
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "BN_get_rfc2409_prime_1024",
- constants$2.const$4
- );
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- "BN_get_rfc3526_prime_1536",
- constants$2.const$4
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "BN_get_rfc3526_prime_2048",
- constants$2.const$4
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "BN_get_rfc3526_prime_3072",
- constants$2.const$4
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "BN_get_rfc3526_prime_4096",
- constants$2.const$4
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$6.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$6.java
deleted file mode 100644
index 7723abd3f1..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$6.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$6 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$6() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "BN_get_rfc3526_prime_6144",
- constants$2.const$4
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "BN_get_rfc3526_prime_8192",
- constants$2.const$4
- );
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- "ASN1_STRING_length",
- constants$0.const$0
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "ASN1_STRING_get0_data",
- constants$2.const$4
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "EVP_MD_get0_provider",
- constants$2.const$4
- );
- static final FunctionDescriptor const$5 = FunctionDescriptor.of(RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER
- );
- static final MethodHandle const$6 = RuntimeHelper.downcallHandle(
- "EVP_MD_fetch",
- constants$6.const$5
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$7.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$7.java
deleted file mode 100644
index 2ecb4aa6df..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$7.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$7 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$7() {}
- static final FunctionDescriptor const$0 = FunctionDescriptor.ofVoid(
- RuntimeHelper.POINTER
- );
- static final MethodHandle const$1 = RuntimeHelper.downcallHandle(
- "EVP_MD_free",
- constants$7.const$0
- );
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- "EVP_PKEY_get_base_id",
- constants$0.const$0
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "EVP_PKEY_get_bits",
- constants$0.const$0
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "EVP_PKEY_free",
- constants$7.const$0
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "EC_GROUP_free",
- constants$7.const$0
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$8.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$8.java
deleted file mode 100644
index 48543abf9d..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$8.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$8 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$8() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "EC_GROUP_get_curve_name",
- constants$0.const$0
- );
- static final FunctionDescriptor const$1 = FunctionDescriptor.of(RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- JAVA_LONG
- );
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- "d2i_ECPKParameters",
- constants$8.const$1
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "EC_KEY_new_by_curve_name",
- constants$1.const$0
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "EC_KEY_free",
- constants$7.const$0
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "DH_new",
- constants$2.const$0
- );
-}
-
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$9.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$9.java
deleted file mode 100644
index 8c1c398e36..0000000000
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/constants$9.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Generated by jextract
-
-package org.apache.tomcat.util.openssl;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
-import java.lang.foreign.*;
-import static java.lang.foreign.ValueLayout.*;
-final class constants$9 {
-
- // Suppresses default constructor, ensuring non-instantiability.
- private constants$9() {}
- static final MethodHandle const$0 = RuntimeHelper.downcallHandle(
- "DH_free",
- constants$7.const$0
- );
- static final FunctionDescriptor const$1 = FunctionDescriptor.of(JAVA_INT,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER,
- RuntimeHelper.POINTER
- );
- static final MethodHandle const$2 = RuntimeHelper.downcallHandle(
- "DH_set0_pqg",
- constants$9.const$1
- );
- static final MethodHandle const$3 = RuntimeHelper.downcallHandle(
- "X509_STORE_set_flags",
- constants$4.const$5
- );
- static final MethodHandle const$4 = RuntimeHelper.downcallHandle(
- "X509_STORE_CTX_get0_untrusted",
- constants$2.const$4
- );
- static final MethodHandle const$5 = RuntimeHelper.downcallHandle(
- "X509_STORE_add_lookup",
- constants$2.const$2
- );
-}
-
-
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 1115a7737d..cec6621950 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
@@ -18,14 +18,25 @@
// Generated by jextract
package org.apache.tomcat.util.openssl;
+//Generated by jextract
import java.lang.invoke.MethodHandle;
-import java.lang.invoke.VarHandle;
-import java.nio.ByteOrder;
+import java.lang.invoke.MethodHandles;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
+
+@SuppressWarnings("javadoc")
public class openssl_h {
+ static final SymbolLookup SYMBOL_LOOKUP;
+ static {
+ System.loadLibrary("ssl");
+
+ SymbolLookup loaderLookup = SymbolLookup.loaderLookup();
+ Linker linker = Linker.nativeLinker();
+ SYMBOL_LOOKUP = name -> loaderLookup.find(name).or(() -> linker.defaultLookup().find(name));
+ }
+ public static final OfBoolean C_BOOL = JAVA_BOOLEAN;
public static final OfByte C_CHAR = JAVA_BYTE;
public static final OfShort C_SHORT = JAVA_SHORT;
public static final OfInt C_INT = JAVA_INT;
@@ -33,3541 +44,5319 @@ public class openssl_h {
public static final OfLong C_LONG_LONG = JAVA_LONG;
public static final OfFloat C_FLOAT = JAVA_FLOAT;
public static final OfDouble C_DOUBLE = JAVA_DOUBLE;
- public static final AddressLayout C_POINTER = RuntimeHelper.POINTER;
+ public static final AddressLayout C_POINTER = ValueLayout.ADDRESS
+ .withTargetLayout(MemoryLayout.sequenceLayout(java.lang.Long.MAX_VALUE, JAVA_BYTE));
+ private static final int BIO_CLOSE = (int)1L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define BIO_CLOSE 1
* }
*/
public static int BIO_CLOSE() {
- return (int)1L;
+ return BIO_CLOSE;
}
+ private static final int BIO_CTRL_RESET = (int)1L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define BIO_CTRL_RESET 1
* }
*/
public static int BIO_CTRL_RESET() {
- return (int)1L;
+ return BIO_CTRL_RESET;
}
+ private static final int BIO_FP_READ = (int)2L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define BIO_FP_READ 2
* }
*/
public static int BIO_FP_READ() {
- return (int)2L;
+ return BIO_FP_READ;
}
+ private static final int BIO_C_SET_FILENAME = (int)108L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define BIO_C_SET_FILENAME 108
* }
*/
public static int BIO_C_SET_FILENAME() {
- return (int)108L;
+ return BIO_C_SET_FILENAME;
}
+ private static final int NID_info_access = (int)177L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define NID_info_access 177
* }
*/
public static int NID_info_access() {
- return (int)177L;
+ return NID_info_access;
}
+ private static final int X509_FILETYPE_PEM = (int)1L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define X509_FILETYPE_PEM 1
* }
*/
public static int X509_FILETYPE_PEM() {
- return (int)1L;
+ return X509_FILETYPE_PEM;
}
+ private static final int X509_L_FILE_LOAD = (int)1L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define X509_L_FILE_LOAD 1
* }
*/
public static int X509_L_FILE_LOAD() {
- return (int)1L;
+ return X509_L_FILE_LOAD;
}
+ private static final int X509_L_ADD_DIR = (int)2L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define X509_L_ADD_DIR 2
* }
*/
public static int X509_L_ADD_DIR() {
- return (int)2L;
+ return X509_L_ADD_DIR;
}
+ private static final int X509_V_OK = (int)0L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define X509_V_OK 0
* }
*/
public static int X509_V_OK() {
- return (int)0L;
+ return X509_V_OK;
}
+ private static final int X509_V_ERR_CRL_HAS_EXPIRED = (int)12L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define X509_V_ERR_CRL_HAS_EXPIRED 12
* }
*/
public static int X509_V_ERR_CRL_HAS_EXPIRED() {
- return (int)12L;
+ return X509_V_ERR_CRL_HAS_EXPIRED;
}
+ private static final int X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT = (int)18L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT 18
* }
*/
public static int X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT() {
- return (int)18L;
+ return X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT;
}
+ private static final int X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN = (int)19L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN 19
* }
*/
public static int X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN() {
- return (int)19L;
+ return X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN;
}
+ private static final int X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY = (int)20L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY 20
* }
*/
public static int X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY() {
- return (int)20L;
+ return X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY;
}
+ private static final int X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE = (int)21L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE 21
* }
*/
public static int X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE() {
- return (int)21L;
+ return X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE;
}
+ private static final int X509_V_ERR_CERT_UNTRUSTED = (int)27L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define X509_V_ERR_CERT_UNTRUSTED 27
* }
*/
public static int X509_V_ERR_CERT_UNTRUSTED() {
- return (int)27L;
+ return X509_V_ERR_CERT_UNTRUSTED;
}
+ private static final int X509_V_ERR_APPLICATION_VERIFICATION = (int)50L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define X509_V_ERR_APPLICATION_VERIFICATION 50
* }
*/
public static int X509_V_ERR_APPLICATION_VERIFICATION() {
- return (int)50L;
+ return X509_V_ERR_APPLICATION_VERIFICATION;
}
+ private static final int X509_V_FLAG_CRL_CHECK = (int)4L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define X509_V_FLAG_CRL_CHECK 4
* }
*/
public static int X509_V_FLAG_CRL_CHECK() {
- return (int)4L;
+ return X509_V_FLAG_CRL_CHECK;
}
+ private static final int X509_V_FLAG_CRL_CHECK_ALL = (int)8L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define X509_V_FLAG_CRL_CHECK_ALL 8
* }
*/
public static int X509_V_FLAG_CRL_CHECK_ALL() {
- return (int)8L;
+ return X509_V_FLAG_CRL_CHECK_ALL;
}
+ private static final int PEM_R_NO_START_LINE = (int)108L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define PEM_R_NO_START_LINE 108
* }
*/
public static int PEM_R_NO_START_LINE() {
- return (int)108L;
+ return PEM_R_NO_START_LINE;
}
+ private static final int SSL3_VERSION = (int)768L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL3_VERSION 768
* }
*/
public static int SSL3_VERSION() {
- return (int)768L;
+ return SSL3_VERSION;
}
+ private static final int TLS1_VERSION = (int)769L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define TLS1_VERSION 769
* }
*/
public static int TLS1_VERSION() {
- return (int)769L;
+ return TLS1_VERSION;
}
+ private static final int TLS1_1_VERSION = (int)770L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define TLS1_1_VERSION 770
* }
*/
public static int TLS1_1_VERSION() {
- return (int)770L;
+ return TLS1_1_VERSION;
}
+ private static final int TLS1_2_VERSION = (int)771L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define TLS1_2_VERSION 771
* }
*/
public static int TLS1_2_VERSION() {
- return (int)771L;
+ return TLS1_2_VERSION;
}
+ private static final int TLS1_3_VERSION = (int)772L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define TLS1_3_VERSION 772
* }
*/
public static int TLS1_3_VERSION() {
- return (int)772L;
+ return TLS1_3_VERSION;
}
+ private static final int SSL_SENT_SHUTDOWN = (int)1L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_SENT_SHUTDOWN 1
* }
*/
public static int SSL_SENT_SHUTDOWN() {
- return (int)1L;
+ return SSL_SENT_SHUTDOWN;
}
+ private static final int SSL_RECEIVED_SHUTDOWN = (int)2L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_RECEIVED_SHUTDOWN 2
* }
*/
public static int SSL_RECEIVED_SHUTDOWN() {
- return (int)2L;
+ return SSL_RECEIVED_SHUTDOWN;
}
+ private static final int SSL_OP_SINGLE_ECDH_USE = (int)0L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_OP_SINGLE_ECDH_USE 0
* }
*/
public static int SSL_OP_SINGLE_ECDH_USE() {
- return (int)0L;
+ return SSL_OP_SINGLE_ECDH_USE;
}
+ private static final int SSL_OP_SINGLE_DH_USE = (int)0L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_OP_SINGLE_DH_USE 0
* }
*/
public static int SSL_OP_SINGLE_DH_USE() {
- return (int)0L;
+ return SSL_OP_SINGLE_DH_USE;
}
+ private static final int SSL_OP_NO_SSLv2 = (int)0L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_OP_NO_SSLv2 0
* }
*/
public static int SSL_OP_NO_SSLv2() {
- return (int)0L;
+ return SSL_OP_NO_SSLv2;
}
+ private static final int SSL_CONF_FLAG_FILE = (int)2L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CONF_FLAG_FILE 2
* }
*/
public static int SSL_CONF_FLAG_FILE() {
- return (int)2L;
+ return SSL_CONF_FLAG_FILE;
}
+ private static final int SSL_CONF_FLAG_SERVER = (int)8L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CONF_FLAG_SERVER 8
* }
*/
public static int SSL_CONF_FLAG_SERVER() {
- return (int)8L;
+ return SSL_CONF_FLAG_SERVER;
}
+ private static final int SSL_CONF_FLAG_SHOW_ERRORS = (int)16L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CONF_FLAG_SHOW_ERRORS 16
* }
*/
public static int SSL_CONF_FLAG_SHOW_ERRORS() {
- return (int)16L;
+ return SSL_CONF_FLAG_SHOW_ERRORS;
}
+ private static final int SSL_CONF_FLAG_CERTIFICATE = (int)32L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CONF_FLAG_CERTIFICATE 32
* }
*/
public static int SSL_CONF_FLAG_CERTIFICATE() {
- return (int)32L;
+ return SSL_CONF_FLAG_CERTIFICATE;
}
+ private static final int SSL_CONF_TYPE_UNKNOWN = (int)0L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CONF_TYPE_UNKNOWN 0
* }
*/
public static int SSL_CONF_TYPE_UNKNOWN() {
- return (int)0L;
+ return SSL_CONF_TYPE_UNKNOWN;
}
+ private static final int SSL_CONF_TYPE_FILE = (int)2L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CONF_TYPE_FILE 2
* }
*/
public static int SSL_CONF_TYPE_FILE() {
- return (int)2L;
+ return SSL_CONF_TYPE_FILE;
}
+ private static final int SSL_CONF_TYPE_DIR = (int)3L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CONF_TYPE_DIR 3
* }
*/
public static int SSL_CONF_TYPE_DIR() {
- return (int)3L;
+ return SSL_CONF_TYPE_DIR;
}
+ private static final int SSL_SESS_CACHE_OFF = (int)0L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_SESS_CACHE_OFF 0
* }
*/
public static int SSL_SESS_CACHE_OFF() {
- return (int)0L;
+ return SSL_SESS_CACHE_OFF;
}
+ private static final int SSL_SESS_CACHE_SERVER = (int)2L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_SESS_CACHE_SERVER 2
* }
*/
public static int SSL_SESS_CACHE_SERVER() {
- return (int)2L;
+ return SSL_SESS_CACHE_SERVER;
}
+ private static final int SSL2_VERSION = (int)2L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL2_VERSION 2
* }
*/
public static int SSL2_VERSION() {
- return (int)2L;
+ return SSL2_VERSION;
}
+ private static final int SSL_TLSEXT_ERR_OK = (int)0L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_TLSEXT_ERR_OK 0
* }
*/
public static int SSL_TLSEXT_ERR_OK() {
- return (int)0L;
+ return SSL_TLSEXT_ERR_OK;
}
+ private static final int SSL_TLSEXT_ERR_NOACK = (int)3L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_TLSEXT_ERR_NOACK 3
* }
*/
public static int SSL_TLSEXT_ERR_NOACK() {
- return (int)3L;
+ return SSL_TLSEXT_ERR_NOACK;
}
+ private static final int SSL_CB_HANDSHAKE_DONE = (int)32L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CB_HANDSHAKE_DONE 32
* }
*/
public static int SSL_CB_HANDSHAKE_DONE() {
- return (int)32L;
+ return SSL_CB_HANDSHAKE_DONE;
}
+ private static final int SSL_VERIFY_NONE = (int)0L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_VERIFY_NONE 0
* }
*/
public static int SSL_VERIFY_NONE() {
- return (int)0L;
+ return SSL_VERIFY_NONE;
}
+ private static final int SSL_VERIFY_PEER = (int)1L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_VERIFY_PEER 1
* }
*/
public static int SSL_VERIFY_PEER() {
- return (int)1L;
+ return SSL_VERIFY_PEER;
}
+ private static final int SSL_VERIFY_FAIL_IF_NO_PEER_CERT = (int)2L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_VERIFY_FAIL_IF_NO_PEER_CERT 2
* }
*/
public static int SSL_VERIFY_FAIL_IF_NO_PEER_CERT() {
- return (int)2L;
+ return SSL_VERIFY_FAIL_IF_NO_PEER_CERT;
}
+ private static final int SSL_ERROR_NONE = (int)0L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_ERROR_NONE 0
* }
*/
public static int SSL_ERROR_NONE() {
- return (int)0L;
+ return SSL_ERROR_NONE;
}
+ private static final int SSL_CTRL_SET_TMP_DH = (int)3L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_SET_TMP_DH 3
* }
*/
public static int SSL_CTRL_SET_TMP_DH() {
- return (int)3L;
+ return SSL_CTRL_SET_TMP_DH;
}
+ private static final int SSL_CTRL_SET_TMP_ECDH = (int)4L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_SET_TMP_ECDH 4
* }
*/
public static int SSL_CTRL_SET_TMP_ECDH() {
- return (int)4L;
+ return SSL_CTRL_SET_TMP_ECDH;
}
+ private static final int SSL_CTRL_SESS_NUMBER = (int)20L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_SESS_NUMBER 20
* }
*/
public static int SSL_CTRL_SESS_NUMBER() {
- return (int)20L;
+ return SSL_CTRL_SESS_NUMBER;
}
+ private static final int SSL_CTRL_SESS_CONNECT = (int)21L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_SESS_CONNECT 21
* }
*/
public static int SSL_CTRL_SESS_CONNECT() {
- return (int)21L;
+ return SSL_CTRL_SESS_CONNECT;
}
+ private static final int SSL_CTRL_SESS_CONNECT_GOOD = (int)22L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_SESS_CONNECT_GOOD 22
* }
*/
public static int SSL_CTRL_SESS_CONNECT_GOOD() {
- return (int)22L;
+ return SSL_CTRL_SESS_CONNECT_GOOD;
}
+ private static final int SSL_CTRL_SESS_CONNECT_RENEGOTIATE = (int)23L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_SESS_CONNECT_RENEGOTIATE 23
* }
*/
public static int SSL_CTRL_SESS_CONNECT_RENEGOTIATE() {
- return (int)23L;
+ return SSL_CTRL_SESS_CONNECT_RENEGOTIATE;
}
+ private static final int SSL_CTRL_SESS_ACCEPT = (int)24L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_SESS_ACCEPT 24
* }
*/
public static int SSL_CTRL_SESS_ACCEPT() {
- return (int)24L;
+ return SSL_CTRL_SESS_ACCEPT;
}
+ private static final int SSL_CTRL_SESS_ACCEPT_GOOD = (int)25L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_SESS_ACCEPT_GOOD 25
* }
*/
public static int SSL_CTRL_SESS_ACCEPT_GOOD() {
- return (int)25L;
+ return SSL_CTRL_SESS_ACCEPT_GOOD;
}
+ private static final int SSL_CTRL_SESS_ACCEPT_RENEGOTIATE = (int)26L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_SESS_ACCEPT_RENEGOTIATE 26
* }
*/
public static int SSL_CTRL_SESS_ACCEPT_RENEGOTIATE() {
- return (int)26L;
+ return SSL_CTRL_SESS_ACCEPT_RENEGOTIATE;
}
+ private static final int SSL_CTRL_SESS_HIT = (int)27L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_SESS_HIT 27
* }
*/
public static int SSL_CTRL_SESS_HIT() {
- return (int)27L;
+ return SSL_CTRL_SESS_HIT;
}
+ private static final int SSL_CTRL_SESS_CB_HIT = (int)28L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_SESS_CB_HIT 28
* }
*/
public static int SSL_CTRL_SESS_CB_HIT() {
- return (int)28L;
+ return SSL_CTRL_SESS_CB_HIT;
}
+ private static final int SSL_CTRL_SESS_MISSES = (int)29L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_SESS_MISSES 29
* }
*/
public static int SSL_CTRL_SESS_MISSES() {
- return (int)29L;
+ return SSL_CTRL_SESS_MISSES;
}
+ private static final int SSL_CTRL_SESS_TIMEOUTS = (int)30L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_SESS_TIMEOUTS 30
* }
*/
public static int SSL_CTRL_SESS_TIMEOUTS() {
- return (int)30L;
+ return SSL_CTRL_SESS_TIMEOUTS;
}
+ private static final int SSL_CTRL_SESS_CACHE_FULL = (int)31L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_SESS_CACHE_FULL 31
* }
*/
public static int SSL_CTRL_SESS_CACHE_FULL() {
- return (int)31L;
+ return SSL_CTRL_SESS_CACHE_FULL;
}
+ private static final int SSL_CTRL_SET_SESS_CACHE_SIZE = (int)42L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_SET_SESS_CACHE_SIZE 42
* }
*/
public static int SSL_CTRL_SET_SESS_CACHE_SIZE() {
- return (int)42L;
+ return SSL_CTRL_SET_SESS_CACHE_SIZE;
}
+ private static final int SSL_CTRL_GET_SESS_CACHE_SIZE = (int)43L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_GET_SESS_CACHE_SIZE 43
* }
*/
public static int SSL_CTRL_GET_SESS_CACHE_SIZE() {
- return (int)43L;
+ return SSL_CTRL_GET_SESS_CACHE_SIZE;
}
+ private static final int SSL_CTRL_SET_SESS_CACHE_MODE = (int)44L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_SET_SESS_CACHE_MODE 44
* }
*/
public static int SSL_CTRL_SET_SESS_CACHE_MODE() {
- return (int)44L;
+ return SSL_CTRL_SET_SESS_CACHE_MODE;
}
+ private static final int SSL_CTRL_GET_SESS_CACHE_MODE = (int)45L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_GET_SESS_CACHE_MODE 45
* }
*/
public static int SSL_CTRL_GET_SESS_CACHE_MODE() {
- return (int)45L;
+ return SSL_CTRL_GET_SESS_CACHE_MODE;
}
+ private static final int SSL_CTRL_SET_TLSEXT_TICKET_KEYS = (int)59L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_SET_TLSEXT_TICKET_KEYS 59
* }
*/
public static int SSL_CTRL_SET_TLSEXT_TICKET_KEYS() {
- return (int)59L;
+ return SSL_CTRL_SET_TLSEXT_TICKET_KEYS;
}
+ private static final int SSL_CTRL_CHAIN_CERT = (int)89L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_CHAIN_CERT 89
* }
*/
public static int SSL_CTRL_CHAIN_CERT() {
- return (int)89L;
+ return SSL_CTRL_CHAIN_CERT;
}
+ private static final int SSL_CTRL_SET_GROUPS = (int)91L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_SET_GROUPS 91
* }
*/
public static int SSL_CTRL_SET_GROUPS() {
- return (int)91L;
+ return SSL_CTRL_SET_GROUPS;
}
+ private static final int SSL_CTRL_SET_DH_AUTO = (int)118L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_SET_DH_AUTO 118
* }
*/
public static int SSL_CTRL_SET_DH_AUTO() {
- return (int)118L;
+ return SSL_CTRL_SET_DH_AUTO;
}
+ private static final int SSL_CTRL_SET_MIN_PROTO_VERSION = (int)123L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_SET_MIN_PROTO_VERSION 123
* }
*/
public static int SSL_CTRL_SET_MIN_PROTO_VERSION() {
- return (int)123L;
+ return SSL_CTRL_SET_MIN_PROTO_VERSION;
}
+ private static final int SSL_CTRL_SET_MAX_PROTO_VERSION = (int)124L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_CTRL_SET_MAX_PROTO_VERSION 124
* }
*/
public static int SSL_CTRL_SET_MAX_PROTO_VERSION() {
- return (int)124L;
+ return SSL_CTRL_SET_MAX_PROTO_VERSION;
}
+ private static final int ERR_REASON_MASK = (int)8388607L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define ERR_REASON_MASK 8388607
* }
*/
public static int ERR_REASON_MASK() {
- return (int)8388607L;
+ return ERR_REASON_MASK;
}
+ private static final int OCSP_RESPONSE_STATUS_SUCCESSFUL = (int)0L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define OCSP_RESPONSE_STATUS_SUCCESSFUL 0
* }
*/
public static int OCSP_RESPONSE_STATUS_SUCCESSFUL() {
- return (int)0L;
+ return OCSP_RESPONSE_STATUS_SUCCESSFUL;
}
+ private static final int V_OCSP_CERTSTATUS_GOOD = (int)0L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define V_OCSP_CERTSTATUS_GOOD 0
* }
*/
public static int V_OCSP_CERTSTATUS_GOOD() {
- return (int)0L;
+ return V_OCSP_CERTSTATUS_GOOD;
}
+ private static final int V_OCSP_CERTSTATUS_REVOKED = (int)1L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define V_OCSP_CERTSTATUS_REVOKED 1
* }
*/
public static int V_OCSP_CERTSTATUS_REVOKED() {
- return (int)1L;
+ return V_OCSP_CERTSTATUS_REVOKED;
}
+ private static final int V_OCSP_CERTSTATUS_UNKNOWN = (int)2L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define V_OCSP_CERTSTATUS_UNKNOWN 2
* }
*/
public static int V_OCSP_CERTSTATUS_UNKNOWN() {
- return (int)2L;
- }
- public static MethodHandle OPENSSL_sk_num$MH() {
- return RuntimeHelper.requireNonNull(constants$0.const$1,"OPENSSL_sk_num");
+ return V_OCSP_CERTSTATUS_UNKNOWN;
}
/**
- * {@snippet :
+ * {@snippet lang=c :
* int OPENSSL_sk_num(const OPENSSL_STACK*);
* }
*/
+ public static MethodHandle OPENSSL_sk_num$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("OPENSSL_sk_num"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int OPENSSL_sk_num(MemorySegment x0) {
var mh$ = OPENSSL_sk_num$MH();
try {
- return (int)mh$.invokeExact(x0);
+ return (int) mh$.invokeExact(x0);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle OPENSSL_sk_value$MH() {
- return RuntimeHelper.requireNonNull(constants$0.const$3,"OPENSSL_sk_value");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void* OPENSSL_sk_value(const OPENSSL_STACK*, int);
* }
*/
+ public static MethodHandle OPENSSL_sk_value$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ JAVA_INT
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("OPENSSL_sk_value"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment OPENSSL_sk_value(MemorySegment x0, int x1) {
var mh$ = OPENSSL_sk_value$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(x0, x1);
+ return (MemorySegment) mh$.invokeExact(x0, x1);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle OpenSSL_version_num$MH() {
- return RuntimeHelper.requireNonNull(constants$0.const$5,"OpenSSL_version_num");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* unsigned long OpenSSL_version_num();
* }
*/
+ public static MethodHandle OpenSSL_version_num$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_LONG );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("OpenSSL_version_num"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static long OpenSSL_version_num() {
var mh$ = OpenSSL_version_num$MH();
try {
- return (long)mh$.invokeExact();
+ return (long) mh$.invokeExact();
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle OpenSSL_version$MH() {
- return RuntimeHelper.requireNonNull(constants$1.const$1,"OpenSSL_version");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* char* OpenSSL_version(int type);
* }
*/
+ public static MethodHandle OpenSSL_version$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ JAVA_INT
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("OpenSSL_version"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment OpenSSL_version(int type) {
var mh$ = OpenSSL_version$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(type);
+ return (MemorySegment) mh$.invokeExact(type);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle CRYPTO_free$MH() {
- return RuntimeHelper.requireNonNull(constants$1.const$3,"CRYPTO_free");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void CRYPTO_free(void* ptr, char* file, int line);
* }
*/
+ public static MethodHandle CRYPTO_free$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ JAVA_INT
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("CRYPTO_free"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void CRYPTO_free(MemorySegment ptr, MemorySegment file, int line) {
var mh$ = CRYPTO_free$MH();
try {
mh$.invokeExact(ptr, file, line);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle BIO_ctrl_pending$MH() {
- return RuntimeHelper.requireNonNull(constants$1.const$5,"BIO_ctrl_pending");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* size_t BIO_ctrl_pending(BIO* b);
* }
*/
+ public static MethodHandle BIO_ctrl_pending$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_LONG,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("BIO_ctrl_pending"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static long BIO_ctrl_pending(MemorySegment b) {
var mh$ = BIO_ctrl_pending$MH();
try {
- return (long)mh$.invokeExact(b);
+ return (long) mh$.invokeExact(b);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle BIO_s_file$MH() {
- return RuntimeHelper.requireNonNull(constants$2.const$1,"BIO_s_file");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* const BIO_METHOD* BIO_s_file();
* }
*/
+ public static MethodHandle BIO_s_file$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("BIO_s_file"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment BIO_s_file() {
var mh$ = BIO_s_file$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact();
+ return (MemorySegment) mh$.invokeExact();
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle BIO_new_file$MH() {
- return RuntimeHelper.requireNonNull(constants$2.const$3,"BIO_new_file");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* BIO* BIO_new_file(char* filename, char* mode);
* }
*/
+ public static MethodHandle BIO_new_file$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("BIO_new_file"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment BIO_new_file(MemorySegment filename, MemorySegment mode) {
var mh$ = BIO_new_file$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(filename, mode);
+ return (MemorySegment) mh$.invokeExact(filename, mode);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle BIO_new$MH() {
- return RuntimeHelper.requireNonNull(constants$2.const$5,"BIO_new");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* BIO* BIO_new(const BIO_METHOD* type);
* }
*/
+ public static MethodHandle BIO_new$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("BIO_new"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment BIO_new(MemorySegment type) {
var mh$ = BIO_new$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(type);
+ return (MemorySegment) mh$.invokeExact(type);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle BIO_free$MH() {
- return RuntimeHelper.requireNonNull(constants$3.const$0,"BIO_free");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int BIO_free(BIO* a);
* }
*/
+ public static MethodHandle BIO_free$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("BIO_free"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int BIO_free(MemorySegment a) {
var mh$ = BIO_free$MH();
try {
- return (int)mh$.invokeExact(a);
+ return (int) mh$.invokeExact(a);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle BIO_read$MH() {
- return RuntimeHelper.requireNonNull(constants$3.const$2,"BIO_read");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int BIO_read(BIO* b, void* data, int dlen);
* }
*/
+ public static MethodHandle BIO_read$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ JAVA_INT
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("BIO_read"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int BIO_read(MemorySegment b, MemorySegment data, int dlen) {
var mh$ = BIO_read$MH();
try {
- return (int)mh$.invokeExact(b, data, dlen);
+ return (int) mh$.invokeExact(b, data, dlen);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle BIO_write$MH() {
- return RuntimeHelper.requireNonNull(constants$3.const$3,"BIO_write");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int BIO_write(BIO* b, void* data, int dlen);
* }
*/
+ public static MethodHandle BIO_write$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ JAVA_INT
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("BIO_write"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int BIO_write(MemorySegment b, MemorySegment data, int dlen) {
var mh$ = BIO_write$MH();
try {
- return (int)mh$.invokeExact(b, data, dlen);
+ return (int) mh$.invokeExact(b, data, dlen);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle BIO_ctrl$MH() {
- return RuntimeHelper.requireNonNull(constants$3.const$5,"BIO_ctrl");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* long BIO_ctrl(BIO* bp, int cmd, long larg, void* parg);
* }
*/
+ public static MethodHandle BIO_ctrl$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_LONG,
+ openssl_h.C_POINTER,
+ JAVA_INT,
+ JAVA_LONG,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("BIO_ctrl"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static long BIO_ctrl(MemorySegment bp, int cmd, long larg, MemorySegment parg) {
var mh$ = BIO_ctrl$MH();
try {
- return (long)mh$.invokeExact(bp, cmd, larg, parg);
+ return (long) mh$.invokeExact(bp, cmd, larg, parg);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle BIO_s_mem$MH() {
- return RuntimeHelper.requireNonNull(constants$4.const$0,"BIO_s_mem");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* const BIO_METHOD* BIO_s_mem();
* }
*/
+ public static MethodHandle BIO_s_mem$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("BIO_s_mem"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment BIO_s_mem() {
var mh$ = BIO_s_mem$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact();
+ return (MemorySegment) mh$.invokeExact();
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle BIO_s_bio$MH() {
- return RuntimeHelper.requireNonNull(constants$4.const$1,"BIO_s_bio");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* const BIO_METHOD* BIO_s_bio();
* }
*/
+ public static MethodHandle BIO_s_bio$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("BIO_s_bio"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment BIO_s_bio() {
var mh$ = BIO_s_bio$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact();
+ return (MemorySegment) mh$.invokeExact();
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle BIO_new_bio_pair$MH() {
- return RuntimeHelper.requireNonNull(constants$4.const$3,"BIO_new_bio_pair");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int BIO_new_bio_pair(BIO** bio1, size_t writebuf1, BIO** bio2, size_t writebuf2);
* }
*/
+ public static MethodHandle BIO_new_bio_pair$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ JAVA_LONG,
+ openssl_h.C_POINTER,
+ JAVA_LONG
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("BIO_new_bio_pair"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int BIO_new_bio_pair(MemorySegment bio1, long writebuf1, MemorySegment bio2, long writebuf2) {
var mh$ = BIO_new_bio_pair$MH();
try {
- return (int)mh$.invokeExact(bio1, writebuf1, bio2, writebuf2);
+ return (int) mh$.invokeExact(bio1, writebuf1, bio2, writebuf2);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle BN_new$MH() {
- return RuntimeHelper.requireNonNull(constants$4.const$4,"BN_new");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* BIGNUM* BN_new();
* }
*/
+ public static MethodHandle BN_new$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("BN_new"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment BN_new() {
var mh$ = BN_new$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact();
+ return (MemorySegment) mh$.invokeExact();
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle BN_set_word$MH() {
- return RuntimeHelper.requireNonNull(constants$4.const$6,"BN_set_word");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int BN_set_word(BIGNUM* a, unsigned long w);
* }
*/
+ public static MethodHandle BN_set_word$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ JAVA_LONG
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("BN_set_word"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int BN_set_word(MemorySegment a, long w) {
var mh$ = BN_set_word$MH();
try {
- return (int)mh$.invokeExact(a, w);
+ return (int) mh$.invokeExact(a, w);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle BN_get_rfc2409_prime_768$MH() {
- return RuntimeHelper.requireNonNull(constants$5.const$0,"BN_get_rfc2409_prime_768");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* BIGNUM* BN_get_rfc2409_prime_768(BIGNUM* bn);
* }
*/
+ public static MethodHandle BN_get_rfc2409_prime_768$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("BN_get_rfc2409_prime_768"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment BN_get_rfc2409_prime_768(MemorySegment bn) {
var mh$ = BN_get_rfc2409_prime_768$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(bn);
+ return (MemorySegment) mh$.invokeExact(bn);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle BN_get_rfc2409_prime_1024$MH() {
- return RuntimeHelper.requireNonNull(constants$5.const$1,"BN_get_rfc2409_prime_1024");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* BIGNUM* BN_get_rfc2409_prime_1024(BIGNUM* bn);
* }
*/
+ public static MethodHandle BN_get_rfc2409_prime_1024$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("BN_get_rfc2409_prime_1024"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment BN_get_rfc2409_prime_1024(MemorySegment bn) {
var mh$ = BN_get_rfc2409_prime_1024$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(bn);
+ return (MemorySegment) mh$.invokeExact(bn);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle BN_get_rfc3526_prime_1536$MH() {
- return RuntimeHelper.requireNonNull(constants$5.const$2,"BN_get_rfc3526_prime_1536");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* BIGNUM* BN_get_rfc3526_prime_1536(BIGNUM* bn);
* }
*/
+ public static MethodHandle BN_get_rfc3526_prime_1536$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("BN_get_rfc3526_prime_1536"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment BN_get_rfc3526_prime_1536(MemorySegment bn) {
var mh$ = BN_get_rfc3526_prime_1536$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(bn);
+ return (MemorySegment) mh$.invokeExact(bn);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle BN_get_rfc3526_prime_2048$MH() {
- return RuntimeHelper.requireNonNull(constants$5.const$3,"BN_get_rfc3526_prime_2048");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* BIGNUM* BN_get_rfc3526_prime_2048(BIGNUM* bn);
* }
*/
+ public static MethodHandle BN_get_rfc3526_prime_2048$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("BN_get_rfc3526_prime_2048"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment BN_get_rfc3526_prime_2048(MemorySegment bn) {
var mh$ = BN_get_rfc3526_prime_2048$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(bn);
+ return (MemorySegment) mh$.invokeExact(bn);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle BN_get_rfc3526_prime_3072$MH() {
- return RuntimeHelper.requireNonNull(constants$5.const$4,"BN_get_rfc3526_prime_3072");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* BIGNUM* BN_get_rfc3526_prime_3072(BIGNUM* bn);
* }
*/
+ public static MethodHandle BN_get_rfc3526_prime_3072$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("BN_get_rfc3526_prime_3072"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment BN_get_rfc3526_prime_3072(MemorySegment bn) {
var mh$ = BN_get_rfc3526_prime_3072$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(bn);
+ return (MemorySegment) mh$.invokeExact(bn);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle BN_get_rfc3526_prime_4096$MH() {
- return RuntimeHelper.requireNonNull(constants$5.const$5,"BN_get_rfc3526_prime_4096");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* BIGNUM* BN_get_rfc3526_prime_4096(BIGNUM* bn);
* }
*/
+ public static MethodHandle BN_get_rfc3526_prime_4096$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("BN_get_rfc3526_prime_4096"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment BN_get_rfc3526_prime_4096(MemorySegment bn) {
var mh$ = BN_get_rfc3526_prime_4096$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(bn);
+ return (MemorySegment) mh$.invokeExact(bn);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle BN_get_rfc3526_prime_6144$MH() {
- return RuntimeHelper.requireNonNull(constants$6.const$0,"BN_get_rfc3526_prime_6144");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* BIGNUM* BN_get_rfc3526_prime_6144(BIGNUM* bn);
* }
*/
+ public static MethodHandle BN_get_rfc3526_prime_6144$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("BN_get_rfc3526_prime_6144"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment BN_get_rfc3526_prime_6144(MemorySegment bn) {
var mh$ = BN_get_rfc3526_prime_6144$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(bn);
+ return (MemorySegment) mh$.invokeExact(bn);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle BN_get_rfc3526_prime_8192$MH() {
- return RuntimeHelper.requireNonNull(constants$6.const$1,"BN_get_rfc3526_prime_8192");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* BIGNUM* BN_get_rfc3526_prime_8192(BIGNUM* bn);
* }
*/
+ public static MethodHandle BN_get_rfc3526_prime_8192$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("BN_get_rfc3526_prime_8192"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment BN_get_rfc3526_prime_8192(MemorySegment bn) {
var mh$ = BN_get_rfc3526_prime_8192$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(bn);
+ return (MemorySegment) mh$.invokeExact(bn);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle ASN1_STRING_length$MH() {
- return RuntimeHelper.requireNonNull(constants$6.const$2,"ASN1_STRING_length");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int ASN1_STRING_length(const ASN1_STRING* x);
* }
*/
+ public static MethodHandle ASN1_STRING_length$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("ASN1_STRING_length"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int ASN1_STRING_length(MemorySegment x) {
var mh$ = ASN1_STRING_length$MH();
try {
- return (int)mh$.invokeExact(x);
+ return (int) mh$.invokeExact(x);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle ASN1_STRING_get0_data$MH() {
- return RuntimeHelper.requireNonNull(constants$6.const$3,"ASN1_STRING_get0_data");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* unsigned char* ASN1_STRING_get0_data(const ASN1_STRING* x);
* }
*/
+ public static MethodHandle ASN1_STRING_get0_data$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("ASN1_STRING_get0_data"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment ASN1_STRING_get0_data(MemorySegment x) {
var mh$ = ASN1_STRING_get0_data$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(x);
+ return (MemorySegment) mh$.invokeExact(x);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle EVP_MD_get0_provider$MH() {
- return RuntimeHelper.requireNonNull(constants$6.const$4,"EVP_MD_get0_provider");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* const OSSL_PROVIDER* EVP_MD_get0_provider(const EVP_MD* md);
* }
*/
+ public static MethodHandle EVP_MD_get0_provider$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("EVP_MD_get0_provider"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment EVP_MD_get0_provider(MemorySegment md) {
var mh$ = EVP_MD_get0_provider$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(md);
+ return (MemorySegment) mh$.invokeExact(md);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle EVP_MD_fetch$MH() {
- return RuntimeHelper.requireNonNull(constants$6.const$6,"EVP_MD_fetch");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* EVP_MD* EVP_MD_fetch(OSSL_LIB_CTX* ctx, char* algorithm, char* properties);
* }
*/
+ public static MethodHandle EVP_MD_fetch$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("EVP_MD_fetch"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment EVP_MD_fetch(MemorySegment ctx, MemorySegment algorithm, MemorySegment properties) {
var mh$ = EVP_MD_fetch$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(ctx, algorithm, properties);
+ return (MemorySegment) mh$.invokeExact(ctx, algorithm, properties);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle EVP_MD_free$MH() {
- return RuntimeHelper.requireNonNull(constants$7.const$1,"EVP_MD_free");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void EVP_MD_free(EVP_MD* md);
* }
*/
+ public static MethodHandle EVP_MD_free$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("EVP_MD_free"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void EVP_MD_free(MemorySegment md) {
var mh$ = EVP_MD_free$MH();
try {
mh$.invokeExact(md);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle EVP_PKEY_get_base_id$MH() {
- return RuntimeHelper.requireNonNull(constants$7.const$2,"EVP_PKEY_get_base_id");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int EVP_PKEY_get_base_id(const EVP_PKEY* pkey);
* }
*/
+ public static MethodHandle EVP_PKEY_get_base_id$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("EVP_PKEY_get_base_id"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int EVP_PKEY_get_base_id(MemorySegment pkey) {
var mh$ = EVP_PKEY_get_base_id$MH();
try {
- return (int)mh$.invokeExact(pkey);
+ return (int) mh$.invokeExact(pkey);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle EVP_PKEY_get_bits$MH() {
- return RuntimeHelper.requireNonNull(constants$7.const$3,"EVP_PKEY_get_bits");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int EVP_PKEY_get_bits(const EVP_PKEY* pkey);
* }
*/
+ public static MethodHandle EVP_PKEY_get_bits$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("EVP_PKEY_get_bits"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int EVP_PKEY_get_bits(MemorySegment pkey) {
var mh$ = EVP_PKEY_get_bits$MH();
try {
- return (int)mh$.invokeExact(pkey);
+ return (int) mh$.invokeExact(pkey);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle EVP_PKEY_free$MH() {
- return RuntimeHelper.requireNonNull(constants$7.const$4,"EVP_PKEY_free");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void EVP_PKEY_free(EVP_PKEY* pkey);
* }
*/
+ public static MethodHandle EVP_PKEY_free$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("EVP_PKEY_free"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void EVP_PKEY_free(MemorySegment pkey) {
var mh$ = EVP_PKEY_free$MH();
try {
mh$.invokeExact(pkey);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle EC_GROUP_free$MH() {
- return RuntimeHelper.requireNonNull(constants$7.const$5,"EC_GROUP_free");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void EC_GROUP_free(EC_GROUP* group);
* }
*/
+ public static MethodHandle EC_GROUP_free$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("EC_GROUP_free"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void EC_GROUP_free(MemorySegment group) {
var mh$ = EC_GROUP_free$MH();
try {
mh$.invokeExact(group);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle EC_GROUP_get_curve_name$MH() {
- return RuntimeHelper.requireNonNull(constants$8.const$0,"EC_GROUP_get_curve_name");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int EC_GROUP_get_curve_name(const EC_GROUP* group);
* }
*/
+ public static MethodHandle EC_GROUP_get_curve_name$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("EC_GROUP_get_curve_name"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int EC_GROUP_get_curve_name(MemorySegment group) {
var mh$ = EC_GROUP_get_curve_name$MH();
try {
- return (int)mh$.invokeExact(group);
+ return (int) mh$.invokeExact(group);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle d2i_ECPKParameters$MH() {
- return RuntimeHelper.requireNonNull(constants$8.const$2,"d2i_ECPKParameters");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* EC_GROUP* d2i_ECPKParameters(EC_GROUP**, unsigned char** in, long len);
* }
*/
+ public static MethodHandle d2i_ECPKParameters$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ JAVA_LONG
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("d2i_ECPKParameters"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment d2i_ECPKParameters(MemorySegment x0, MemorySegment in, long len) {
var mh$ = d2i_ECPKParameters$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(x0, in, len);
+ return (MemorySegment) mh$.invokeExact(x0, in, len);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle EC_KEY_new_by_curve_name$MH() {
- return RuntimeHelper.requireNonNull(constants$8.const$3,"EC_KEY_new_by_curve_name");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* EC_KEY* EC_KEY_new_by_curve_name(int nid);
* }
*/
- @Deprecated
+ public static MethodHandle EC_KEY_new_by_curve_name$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ JAVA_INT
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("EC_KEY_new_by_curve_name"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment EC_KEY_new_by_curve_name(int nid) {
var mh$ = EC_KEY_new_by_curve_name$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(nid);
+ return (MemorySegment) mh$.invokeExact(nid);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle EC_KEY_free$MH() {
- return RuntimeHelper.requireNonNull(constants$8.const$4,"EC_KEY_free");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void EC_KEY_free(EC_KEY* key);
* }
*/
- @Deprecated
+ public static MethodHandle EC_KEY_free$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("EC_KEY_free"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void EC_KEY_free(MemorySegment key) {
var mh$ = EC_KEY_free$MH();
try {
mh$.invokeExact(key);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle DH_new$MH() {
- return RuntimeHelper.requireNonNull(constants$8.const$5,"DH_new");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* DH* DH_new();
* }
*/
- @Deprecated
+ public static MethodHandle DH_new$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("DH_new"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment DH_new() {
var mh$ = DH_new$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact();
+ return (MemorySegment) mh$.invokeExact();
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle DH_free$MH() {
- return RuntimeHelper.requireNonNull(constants$9.const$0,"DH_free");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void DH_free(DH* dh);
* }
*/
- @Deprecated
+ public static MethodHandle DH_free$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("DH_free"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void DH_free(MemorySegment dh) {
var mh$ = DH_free$MH();
try {
mh$.invokeExact(dh);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle DH_set0_pqg$MH() {
- return RuntimeHelper.requireNonNull(constants$9.const$2,"DH_set0_pqg");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int DH_set0_pqg(DH* dh, BIGNUM* p, BIGNUM* q, BIGNUM* g);
* }
*/
- @Deprecated
+ public static MethodHandle DH_set0_pqg$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("DH_set0_pqg"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int DH_set0_pqg(MemorySegment dh, MemorySegment p, MemorySegment q, MemorySegment g) {
var mh$ = DH_set0_pqg$MH();
try {
- return (int)mh$.invokeExact(dh, p, q, g);
+ return (int) mh$.invokeExact(dh, p, q, g);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle X509_STORE_set_flags$MH() {
- return RuntimeHelper.requireNonNull(constants$9.const$3,"X509_STORE_set_flags");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int X509_STORE_set_flags(X509_STORE* ctx, unsigned long flags);
* }
*/
+ public static MethodHandle X509_STORE_set_flags$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ JAVA_LONG
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("X509_STORE_set_flags"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int X509_STORE_set_flags(MemorySegment ctx, long flags) {
var mh$ = X509_STORE_set_flags$MH();
try {
- return (int)mh$.invokeExact(ctx, flags);
+ return (int) mh$.invokeExact(ctx, flags);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle X509_STORE_CTX_get0_untrusted$MH() {
- return RuntimeHelper.requireNonNull(constants$9.const$4,"X509_STORE_CTX_get0_untrusted");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* struct stack_st_X509* X509_STORE_CTX_get0_untrusted(const X509_STORE_CTX* ctx);
* }
*/
+ public static MethodHandle X509_STORE_CTX_get0_untrusted$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("X509_STORE_CTX_get0_untrusted"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment X509_STORE_CTX_get0_untrusted(MemorySegment ctx) {
var mh$ = X509_STORE_CTX_get0_untrusted$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(ctx);
+ return (MemorySegment) mh$.invokeExact(ctx);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle X509_STORE_add_lookup$MH() {
- return RuntimeHelper.requireNonNull(constants$9.const$5,"X509_STORE_add_lookup");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* X509_LOOKUP* X509_STORE_add_lookup(X509_STORE* v, X509_LOOKUP_METHOD* m);
* }
*/
+ public static MethodHandle X509_STORE_add_lookup$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("X509_STORE_add_lookup"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment X509_STORE_add_lookup(MemorySegment v, MemorySegment m) {
var mh$ = X509_STORE_add_lookup$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(v, m);
+ return (MemorySegment) mh$.invokeExact(v, m);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle X509_LOOKUP_hash_dir$MH() {
- return RuntimeHelper.requireNonNull(constants$10.const$0,"X509_LOOKUP_hash_dir");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* X509_LOOKUP_METHOD* X509_LOOKUP_hash_dir();
* }
*/
+ public static MethodHandle X509_LOOKUP_hash_dir$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("X509_LOOKUP_hash_dir"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment X509_LOOKUP_hash_dir() {
var mh$ = X509_LOOKUP_hash_dir$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact();
+ return (MemorySegment) mh$.invokeExact();
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle X509_LOOKUP_file$MH() {
- return RuntimeHelper.requireNonNull(constants$10.const$1,"X509_LOOKUP_file");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* X509_LOOKUP_METHOD* X509_LOOKUP_file();
* }
*/
+ public static MethodHandle X509_LOOKUP_file$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("X509_LOOKUP_file"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment X509_LOOKUP_file() {
var mh$ = X509_LOOKUP_file$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact();
+ return (MemorySegment) mh$.invokeExact();
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle X509_LOOKUP_ctrl$MH() {
- return RuntimeHelper.requireNonNull(constants$10.const$3,"X509_LOOKUP_ctrl");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int X509_LOOKUP_ctrl(X509_LOOKUP* ctx, int cmd, char* argc, long argl, char** ret);
* }
*/
+ public static MethodHandle X509_LOOKUP_ctrl$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ JAVA_LONG,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("X509_LOOKUP_ctrl"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int X509_LOOKUP_ctrl(MemorySegment ctx, int cmd, MemorySegment argc, long argl, MemorySegment ret) {
var mh$ = X509_LOOKUP_ctrl$MH();
try {
- return (int)mh$.invokeExact(ctx, cmd, argc, argl, ret);
+ return (int) mh$.invokeExact(ctx, cmd, argc, argl, ret);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle X509_STORE_CTX_get_ex_data$MH() {
- return RuntimeHelper.requireNonNull(constants$10.const$4,"X509_STORE_CTX_get_ex_data");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void* X509_STORE_CTX_get_ex_data(const X509_STORE_CTX* ctx, int idx);
* }
*/
+ public static MethodHandle X509_STORE_CTX_get_ex_data$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ JAVA_INT
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("X509_STORE_CTX_get_ex_data"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment X509_STORE_CTX_get_ex_data(MemorySegment ctx, int idx) {
var mh$ = X509_STORE_CTX_get_ex_data$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(ctx, idx);
+ return (MemorySegment) mh$.invokeExact(ctx, idx);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle X509_STORE_CTX_get_error$MH() {
- return RuntimeHelper.requireNonNull(constants$10.const$5,"X509_STORE_CTX_get_error");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int X509_STORE_CTX_get_error(const X509_STORE_CTX* ctx);
* }
*/
+ public static MethodHandle X509_STORE_CTX_get_error$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("X509_STORE_CTX_get_error"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int X509_STORE_CTX_get_error(MemorySegment ctx) {
var mh$ = X509_STORE_CTX_get_error$MH();
try {
- return (int)mh$.invokeExact(ctx);
+ return (int) mh$.invokeExact(ctx);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle X509_STORE_CTX_set_error$MH() {
- return RuntimeHelper.requireNonNull(constants$11.const$1,"X509_STORE_CTX_set_error");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void X509_STORE_CTX_set_error(X509_STORE_CTX* ctx, int s);
* }
*/
+ public static MethodHandle X509_STORE_CTX_set_error$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER,
+ JAVA_INT
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("X509_STORE_CTX_set_error"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void X509_STORE_CTX_set_error(MemorySegment ctx, int s) {
var mh$ = X509_STORE_CTX_set_error$MH();
try {
mh$.invokeExact(ctx, s);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle X509_STORE_CTX_get_error_depth$MH() {
- return RuntimeHelper.requireNonNull(constants$11.const$2,"X509_STORE_CTX_get_error_depth");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int X509_STORE_CTX_get_error_depth(const X509_STORE_CTX* ctx);
* }
*/
+ public static MethodHandle X509_STORE_CTX_get_error_depth$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("X509_STORE_CTX_get_error_depth"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int X509_STORE_CTX_get_error_depth(MemorySegment ctx) {
var mh$ = X509_STORE_CTX_get_error_depth$MH();
try {
- return (int)mh$.invokeExact(ctx);
+ return (int) mh$.invokeExact(ctx);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle X509_STORE_CTX_get_current_cert$MH() {
- return RuntimeHelper.requireNonNull(constants$11.const$3,"X509_STORE_CTX_get_current_cert");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* X509* X509_STORE_CTX_get_current_cert(const X509_STORE_CTX* ctx);
* }
*/
+ public static MethodHandle X509_STORE_CTX_get_current_cert$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("X509_STORE_CTX_get_current_cert"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment X509_STORE_CTX_get_current_cert(MemorySegment ctx) {
var mh$ = X509_STORE_CTX_get_current_cert$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(ctx);
+ return (MemorySegment) mh$.invokeExact(ctx);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle X509_STORE_CTX_get0_current_issuer$MH() {
- return RuntimeHelper.requireNonNull(constants$11.const$4,"X509_STORE_CTX_get0_current_issuer");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* X509* X509_STORE_CTX_get0_current_issuer(const X509_STORE_CTX* ctx);
* }
*/
+ public static MethodHandle X509_STORE_CTX_get0_current_issuer$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("X509_STORE_CTX_get0_current_issuer"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment X509_STORE_CTX_get0_current_issuer(MemorySegment ctx) {
var mh$ = X509_STORE_CTX_get0_current_issuer$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(ctx);
+ return (MemorySegment) mh$.invokeExact(ctx);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle d2i_X509_bio$MH() {
- return RuntimeHelper.requireNonNull(constants$11.const$5,"d2i_X509_bio");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* X509* d2i_X509_bio(BIO* bp, X509** x509);
* }
*/
+ public static MethodHandle d2i_X509_bio$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("d2i_X509_bio"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment d2i_X509_bio(MemorySegment bp, MemorySegment x509) {
var mh$ = d2i_X509_bio$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(bp, x509);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
- public static MethodHandle X509_free$MH() {
- return RuntimeHelper.requireNonNull(constants$12.const$0,"X509_free");
- }
- /**
- * {@snippet :
- * void X509_free(X509* a);
- * }
- */
- public static void X509_free(MemorySegment a) {
- var mh$ = X509_free$MH();
- try {
- mh$.invokeExact(a);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
- public static MethodHandle d2i_X509$MH() {
- return RuntimeHelper.requireNonNull(constants$12.const$1,"d2i_X509");
- }
- /**
- * {@snippet :
- * X509* d2i_X509(X509** a, unsigned char** in, long len);
- * }
- */
- public static MemorySegment d2i_X509(MemorySegment a, MemorySegment in, long len) {
- var mh$ = d2i_X509$MH();
- try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(a, in, len);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
- public static MethodHandle i2d_X509$MH() {
- return RuntimeHelper.requireNonNull(constants$12.const$3,"i2d_X509");
- }
- /**
- * {@snippet :
- * int i2d_X509(const X509* a, unsigned char** out);
- * }
- */
- public static int i2d_X509(MemorySegment a, MemorySegment out) {
- var mh$ = i2d_X509$MH();
- try {
- return (int)mh$.invokeExact(a, out);
+ return (MemorySegment) mh$.invokeExact(bp, x509);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle X509_get_ext_by_NID$MH() {
- return RuntimeHelper.requireNonNull(constants$12.const$5,"X509_get_ext_by_NID");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int X509_get_ext_by_NID(const X509* x, int nid, int lastpos);
* }
*/
+ public static MethodHandle X509_get_ext_by_NID$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ JAVA_INT,
+ JAVA_INT
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("X509_get_ext_by_NID"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int X509_get_ext_by_NID(MemorySegment x, int nid, int lastpos) {
var mh$ = X509_get_ext_by_NID$MH();
try {
- return (int)mh$.invokeExact(x, nid, lastpos);
+ return (int) mh$.invokeExact(x, nid, lastpos);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle X509_get_ext$MH() {
- return RuntimeHelper.requireNonNull(constants$13.const$0,"X509_get_ext");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* X509_EXTENSION* X509_get_ext(const X509* x, int loc);
* }
*/
+ public static MethodHandle X509_get_ext$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ JAVA_INT
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("X509_get_ext"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment X509_get_ext(MemorySegment x, int loc) {
var mh$ = X509_get_ext$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(x, loc);
+ return (MemorySegment) mh$.invokeExact(x, loc);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle X509_EXTENSION_get_data$MH() {
- return RuntimeHelper.requireNonNull(constants$13.const$1,"X509_EXTENSION_get_data");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* ASN1_OCTET_STRING* X509_EXTENSION_get_data(X509_EXTENSION* ne);
* }
*/
+ public static MethodHandle X509_EXTENSION_get_data$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("X509_EXTENSION_get_data"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment X509_EXTENSION_get_data(MemorySegment ne) {
var mh$ = X509_EXTENSION_get_data$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(ne);
+ return (MemorySegment) mh$.invokeExact(ne);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle PEM_ASN1_read_bio$MH() {
- return RuntimeHelper.requireNonNull(constants$13.const$3,"PEM_ASN1_read_bio");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void* PEM_ASN1_read_bio(d2i_of_void* d2i, char* name, BIO* bp, void** x, pem_password_cb* cb, void* u);
* }
*/
+ public static MethodHandle PEM_ASN1_read_bio$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("PEM_ASN1_read_bio"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment PEM_ASN1_read_bio(MemorySegment d2i, MemorySegment name, MemorySegment bp, MemorySegment x, MemorySegment cb, MemorySegment u) {
var mh$ = PEM_ASN1_read_bio$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(d2i, name, bp, x, cb, u);
+ return (MemorySegment) mh$.invokeExact(d2i, name, bp, x, cb, u);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle PEM_read_bio_X509_AUX$MH() {
- return RuntimeHelper.requireNonNull(constants$13.const$5,"PEM_read_bio_X509_AUX");
- }
/**
- * {@snippet :
- * X509* PEM_read_bio_X509_AUX(BIO* out, X509** x, pem_password_cb* cb, void* u);
+ * {@snippet lang=c :
+ * EVP_PKEY* PEM_read_bio_Parameters(BIO* bp, EVP_PKEY** x);
* }
*/
- public static MemorySegment PEM_read_bio_X509_AUX(MemorySegment out, MemorySegment x, MemorySegment cb, MemorySegment u) {
- var mh$ = PEM_read_bio_X509_AUX$MH();
+ public static MethodHandle PEM_read_bio_Parameters$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("PEM_read_bio_Parameters"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
+ public static MemorySegment PEM_read_bio_Parameters(MemorySegment bp, MemorySegment x) {
+ var mh$ = PEM_read_bio_Parameters$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(out, x, cb, u);
+ return (MemorySegment) mh$.invokeExact(bp, x);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle PEM_read_bio_ECPKParameters$MH() {
- return RuntimeHelper.requireNonNull(constants$14.const$0,"PEM_read_bio_ECPKParameters");
- }
/**
- * {@snippet :
- * EC_GROUP* PEM_read_bio_ECPKParameters(BIO* out, EC_GROUP** x, pem_password_cb* cb, void* u);
+ * {@snippet lang=c :
+ * uint64_t SSL_CTX_get_options(const SSL_CTX* ctx);
* }
*/
- @Deprecated
- public static MemorySegment PEM_read_bio_ECPKParameters(MemorySegment out, MemorySegment x, MemorySegment cb, MemorySegment u) {
- var mh$ = PEM_read_bio_ECPKParameters$MH();
+ public static MethodHandle SSL_CTX_get_options$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_LONG,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_get_options"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
+ public static long SSL_CTX_get_options(MemorySegment ctx) {
+ var mh$ = SSL_CTX_get_options$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(out, x, cb, u);
+ return (long) mh$.invokeExact(ctx);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle PEM_read_bio_DHparams$MH() {
- return RuntimeHelper.requireNonNull(constants$14.const$1,"PEM_read_bio_DHparams");
- }
/**
- * {@snippet :
- * DH* PEM_read_bio_DHparams(BIO* out, DH** x, pem_password_cb* cb, void* u);
+ * {@snippet lang=c :
+ * uint64_t SSL_get_options(const SSL* s);
* }
*/
- @Deprecated
- public static MemorySegment PEM_read_bio_DHparams(MemorySegment out, MemorySegment x, MemorySegment cb, MemorySegment u) {
- var mh$ = PEM_read_bio_DHparams$MH();
+ public static MethodHandle SSL_get_options$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_LONG,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_get_options"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
+ public static long SSL_get_options(MemorySegment s) {
+ var mh$ = SSL_get_options$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(out, x, cb, u);
+ return (long) mh$.invokeExact(s);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle PEM_read_bio_PrivateKey$MH() {
- return RuntimeHelper.requireNonNull(constants$14.const$2,"PEM_read_bio_PrivateKey");
- }
/**
- * {@snippet :
- * EVP_PKEY* PEM_read_bio_PrivateKey(BIO* out, EVP_PKEY** x, pem_password_cb* cb, void* u);
+ * {@snippet lang=c :
+ * uint64_t SSL_CTX_clear_options(SSL_CTX* ctx, uint64_t op);
* }
*/
- public static MemorySegment PEM_read_bio_PrivateKey(MemorySegment out, MemorySegment x, MemorySegment cb, MemorySegment u) {
- var mh$ = PEM_read_bio_PrivateKey$MH();
+ public static MethodHandle SSL_CTX_clear_options$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_LONG,
+ openssl_h.C_POINTER,
+ JAVA_LONG
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_clear_options"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
+ public static long SSL_CTX_clear_options(MemorySegment ctx, long op) {
+ var mh$ = SSL_CTX_clear_options$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(out, x, cb, u);
+ return (long) mh$.invokeExact(ctx, op);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle PEM_read_bio_Parameters$MH() {
- return RuntimeHelper.requireNonNull(constants$14.const$3,"PEM_read_bio_Parameters");
- }
/**
- * {@snippet :
- * EVP_PKEY* PEM_read_bio_Parameters(BIO* bp, EVP_PKEY** x);
+ * {@snippet lang=c :
+ * uint64_t SSL_CTX_set_options(SSL_CTX* ctx, uint64_t op);
* }
*/
- public static MemorySegment PEM_read_bio_Parameters(MemorySegment bp, MemorySegment x) {
- var mh$ = PEM_read_bio_Parameters$MH();
+ public static MethodHandle SSL_CTX_set_options$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_LONG,
+ openssl_h.C_POINTER,
+ JAVA_LONG
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_set_options"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
+ public static long SSL_CTX_set_options(MemorySegment ctx, long op) {
+ var mh$ = SSL_CTX_set_options$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(bp, x);
+ return (long) mh$.invokeExact(ctx, op);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_get_options$MH() {
- return RuntimeHelper.requireNonNull(constants$14.const$4,"SSL_CTX_get_options");
- }
/**
- * {@snippet :
- * uint64_t SSL_CTX_get_options(const SSL_CTX* ctx);
+ * {@snippet lang=c :
+ * uint64_t SSL_set_options(SSL* s, uint64_t op);
* }
*/
- public static long SSL_CTX_get_options(MemorySegment ctx) {
- var mh$ = SSL_CTX_get_options$MH();
+ public static MethodHandle SSL_set_options$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_LONG,
+ openssl_h.C_POINTER,
+ JAVA_LONG
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_set_options"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
+ public static long SSL_set_options(MemorySegment s, long op) {
+ var mh$ = SSL_set_options$MH();
try {
- return (long)mh$.invokeExact(ctx);
+ return (long) mh$.invokeExact(s, op);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_get_options$MH() {
- return RuntimeHelper.requireNonNull(constants$14.const$5,"SSL_get_options");
- }
- /**
- * {@snippet :
- * uint64_t SSL_get_options(const SSL* s);
- * }
- */
- public static long SSL_get_options(MemorySegment s) {
- var mh$ = SSL_get_options$MH();
- try {
- return (long)mh$.invokeExact(s);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
- public static MethodHandle SSL_CTX_clear_options$MH() {
- return RuntimeHelper.requireNonNull(constants$15.const$1,"SSL_CTX_clear_options");
- }
- /**
- * {@snippet :
- * uint64_t SSL_CTX_clear_options(SSL_CTX* ctx, uint64_t op);
- * }
- */
- public static long SSL_CTX_clear_options(MemorySegment ctx, long op) {
- var mh$ = SSL_CTX_clear_options$MH();
- try {
- return (long)mh$.invokeExact(ctx, op);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
- public static MethodHandle SSL_CTX_set_options$MH() {
- return RuntimeHelper.requireNonNull(constants$15.const$2,"SSL_CTX_set_options");
- }
/**
- * {@snippet :
- * uint64_t SSL_CTX_set_options(SSL_CTX* ctx, uint64_t op);
- * }
- */
- public static long SSL_CTX_set_options(MemorySegment ctx, long op) {
- var mh$ = SSL_CTX_set_options$MH();
- try {
- return (long)mh$.invokeExact(ctx, op);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
- public static MethodHandle SSL_set_options$MH() {
- return RuntimeHelper.requireNonNull(constants$15.const$3,"SSL_set_options");
- }
- /**
- * {@snippet :
- * uint64_t SSL_set_options(SSL* s, uint64_t op);
- * }
- */
- public static long SSL_set_options(MemorySegment s, long op) {
- var mh$ = SSL_set_options$MH();
- try {
- return (long)mh$.invokeExact(s, op);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
- public static MethodHandle SSL_CTX_set_alpn_select_cb$MH() {
- return RuntimeHelper.requireNonNull(constants$15.const$5,"SSL_CTX_set_alpn_select_cb");
- }
- /**
- * {@snippet :
+ * {@snippet lang=c :
* void SSL_CTX_set_alpn_select_cb(SSL_CTX* ctx, SSL_CTX_alpn_select_cb_func cb, void* arg);
* }
*/
+ public static MethodHandle SSL_CTX_set_alpn_select_cb$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_set_alpn_select_cb"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void SSL_CTX_set_alpn_select_cb(MemorySegment ctx, MemorySegment cb, MemorySegment arg) {
var mh$ = SSL_CTX_set_alpn_select_cb$MH();
try {
mh$.invokeExact(ctx, cb, arg);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_get0_alpn_selected$MH() {
- return RuntimeHelper.requireNonNull(constants$16.const$0,"SSL_get0_alpn_selected");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void SSL_get0_alpn_selected(const SSL* ssl, unsigned char** data, unsigned int* len);
* }
*/
+ public static MethodHandle SSL_get0_alpn_selected$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_get0_alpn_selected"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void SSL_get0_alpn_selected(MemorySegment ssl, MemorySegment data, MemorySegment len) {
var mh$ = SSL_get0_alpn_selected$MH();
try {
mh$.invokeExact(ssl, data, len);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_in_init$MH() {
- return RuntimeHelper.requireNonNull(constants$16.const$1,"SSL_in_init");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_in_init(const SSL* s);
* }
*/
+ public static MethodHandle SSL_in_init$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_in_init"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_in_init(MemorySegment s) {
var mh$ = SSL_in_init$MH();
try {
- return (int)mh$.invokeExact(s);
+ return (int) mh$.invokeExact(s);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_set0_tmp_dh_pkey$MH() {
- return RuntimeHelper.requireNonNull(constants$16.const$2,"SSL_CTX_set0_tmp_dh_pkey");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_CTX_set0_tmp_dh_pkey(SSL_CTX* ctx, EVP_PKEY* dhpkey);
* }
*/
+ public static MethodHandle SSL_CTX_set0_tmp_dh_pkey$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_set0_tmp_dh_pkey"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_CTX_set0_tmp_dh_pkey(MemorySegment ctx, MemorySegment dhpkey) {
var mh$ = SSL_CTX_set0_tmp_dh_pkey$MH();
try {
- return (int)mh$.invokeExact(ctx, dhpkey);
+ return (int) mh$.invokeExact(ctx, dhpkey);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_set_cipher_list$MH() {
- return RuntimeHelper.requireNonNull(constants$16.const$3,"SSL_CTX_set_cipher_list");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_CTX_set_cipher_list(SSL_CTX*, char* str);
* }
*/
+ public static MethodHandle SSL_CTX_set_cipher_list$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_set_cipher_list"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_CTX_set_cipher_list(MemorySegment x0, MemorySegment str) {
var mh$ = SSL_CTX_set_cipher_list$MH();
try {
- return (int)mh$.invokeExact(x0, str);
+ return (int) mh$.invokeExact(x0, str);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_new$MH() {
- return RuntimeHelper.requireNonNull(constants$16.const$4,"SSL_CTX_new");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* SSL_CTX* SSL_CTX_new(const SSL_METHOD* meth);
* }
*/
+ public static MethodHandle SSL_CTX_new$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_new"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment SSL_CTX_new(MemorySegment meth) {
var mh$ = SSL_CTX_new$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(meth);
+ return (MemorySegment) mh$.invokeExact(meth);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_free$MH() {
- return RuntimeHelper.requireNonNull(constants$16.const$5,"SSL_CTX_free");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void SSL_CTX_free(SSL_CTX*);
* }
*/
+ public static MethodHandle SSL_CTX_free$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_free"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void SSL_CTX_free(MemorySegment x0) {
var mh$ = SSL_CTX_free$MH();
try {
mh$.invokeExact(x0);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_set_timeout$MH() {
- return RuntimeHelper.requireNonNull(constants$17.const$0,"SSL_CTX_set_timeout");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* long SSL_CTX_set_timeout(SSL_CTX* ctx, long t);
* }
*/
+ public static MethodHandle SSL_CTX_set_timeout$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_LONG,
+ openssl_h.C_POINTER,
+ JAVA_LONG
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_set_timeout"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static long SSL_CTX_set_timeout(MemorySegment ctx, long t) {
var mh$ = SSL_CTX_set_timeout$MH();
try {
- return (long)mh$.invokeExact(ctx, t);
+ return (long) mh$.invokeExact(ctx, t);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_get_timeout$MH() {
- return RuntimeHelper.requireNonNull(constants$17.const$1,"SSL_CTX_get_timeout");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* long SSL_CTX_get_timeout(const SSL_CTX* ctx);
* }
*/
+ public static MethodHandle SSL_CTX_get_timeout$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_LONG,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_get_timeout"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static long SSL_CTX_get_timeout(MemorySegment ctx) {
var mh$ = SSL_CTX_get_timeout$MH();
try {
- return (long)mh$.invokeExact(ctx);
+ return (long) mh$.invokeExact(ctx);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_get_cert_store$MH() {
- return RuntimeHelper.requireNonNull(constants$17.const$2,"SSL_CTX_get_cert_store");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* X509_STORE* SSL_CTX_get_cert_store(const SSL_CTX*);
* }
*/
+ public static MethodHandle SSL_CTX_get_cert_store$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_get_cert_store"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment SSL_CTX_get_cert_store(MemorySegment x0) {
var mh$ = SSL_CTX_get_cert_store$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(x0);
+ return (MemorySegment) mh$.invokeExact(x0);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_get_current_cipher$MH() {
- return RuntimeHelper.requireNonNull(constants$17.const$3,"SSL_get_current_cipher");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* const SSL_CIPHER* SSL_get_current_cipher(const SSL* s);
* }
*/
+ public static MethodHandle SSL_get_current_cipher$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_get_current_cipher"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment SSL_get_current_cipher(MemorySegment s) {
var mh$ = SSL_get_current_cipher$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(s);
+ return (MemorySegment) mh$.invokeExact(s);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CIPHER_get_name$MH() {
- return RuntimeHelper.requireNonNull(constants$17.const$4,"SSL_CIPHER_get_name");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* char* SSL_CIPHER_get_name(const SSL_CIPHER* c);
* }
*/
+ public static MethodHandle SSL_CIPHER_get_name$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CIPHER_get_name"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment SSL_CIPHER_get_name(MemorySegment c) {
var mh$ = SSL_CIPHER_get_name$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(c);
+ return (MemorySegment) mh$.invokeExact(c);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CIPHER_get_kx_nid$MH() {
- return RuntimeHelper.requireNonNull(constants$17.const$5,"SSL_CIPHER_get_kx_nid");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_CIPHER_get_kx_nid(const SSL_CIPHER* c);
* }
*/
+ public static MethodHandle SSL_CIPHER_get_kx_nid$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CIPHER_get_kx_nid"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_CIPHER_get_kx_nid(MemorySegment c) {
var mh$ = SSL_CIPHER_get_kx_nid$MH();
try {
- return (int)mh$.invokeExact(c);
+ return (int) mh$.invokeExact(c);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CIPHER_get_auth_nid$MH() {
- return RuntimeHelper.requireNonNull(constants$18.const$0,"SSL_CIPHER_get_auth_nid");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_CIPHER_get_auth_nid(const SSL_CIPHER* c);
* }
*/
+ public static MethodHandle SSL_CIPHER_get_auth_nid$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CIPHER_get_auth_nid"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_CIPHER_get_auth_nid(MemorySegment c) {
var mh$ = SSL_CIPHER_get_auth_nid$MH();
try {
- return (int)mh$.invokeExact(c);
+ return (int) mh$.invokeExact(c);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_pending$MH() {
- return RuntimeHelper.requireNonNull(constants$18.const$1,"SSL_pending");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_pending(const SSL* s);
* }
*/
+ public static MethodHandle SSL_pending$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_pending"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_pending(MemorySegment s) {
var mh$ = SSL_pending$MH();
try {
- return (int)mh$.invokeExact(s);
+ return (int) mh$.invokeExact(s);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_set_bio$MH() {
- return RuntimeHelper.requireNonNull(constants$18.const$2,"SSL_set_bio");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void SSL_set_bio(SSL* s, BIO* rbio, BIO* wbio);
* }
*/
+ public static MethodHandle SSL_set_bio$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_set_bio"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void SSL_set_bio(MemorySegment s, MemorySegment rbio, MemorySegment wbio) {
var mh$ = SSL_set_bio$MH();
try {
mh$.invokeExact(s, rbio, wbio);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_set_cipher_list$MH() {
- return RuntimeHelper.requireNonNull(constants$18.const$3,"SSL_set_cipher_list");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_set_cipher_list(SSL* s, char* str);
* }
*/
+ public static MethodHandle SSL_set_cipher_list$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_set_cipher_list"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_set_cipher_list(MemorySegment s, MemorySegment str) {
var mh$ = SSL_set_cipher_list$MH();
try {
- return (int)mh$.invokeExact(s, str);
+ return (int) mh$.invokeExact(s, str);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_set_ciphersuites$MH() {
- return RuntimeHelper.requireNonNull(constants$18.const$4,"SSL_CTX_set_ciphersuites");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_CTX_set_ciphersuites(SSL_CTX* ctx, char* str);
* }
*/
+ public static MethodHandle SSL_CTX_set_ciphersuites$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_set_ciphersuites"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_CTX_set_ciphersuites(MemorySegment ctx, MemorySegment str) {
var mh$ = SSL_CTX_set_ciphersuites$MH();
try {
- return (int)mh$.invokeExact(ctx, str);
+ return (int) mh$.invokeExact(ctx, str);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_set_verify$MH() {
- return RuntimeHelper.requireNonNull(constants$18.const$6,"SSL_set_verify");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void SSL_set_verify(SSL* s, int mode, SSL_verify_cb callback);
* }
*/
+ public static MethodHandle SSL_set_verify$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER,
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_set_verify"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void SSL_set_verify(MemorySegment s, int mode, MemorySegment callback) {
var mh$ = SSL_set_verify$MH();
try {
mh$.invokeExact(s, mode, callback);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_use_certificate_chain_file$MH() {
- return RuntimeHelper.requireNonNull(constants$19.const$0,"SSL_CTX_use_certificate_chain_file");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_CTX_use_certificate_chain_file(SSL_CTX* ctx, char* file);
* }
*/
+ public static MethodHandle SSL_CTX_use_certificate_chain_file$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_use_certificate_chain_file"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_CTX_use_certificate_chain_file(MemorySegment ctx, MemorySegment file) {
var mh$ = SSL_CTX_use_certificate_chain_file$MH();
try {
- return (int)mh$.invokeExact(ctx, file);
+ return (int) mh$.invokeExact(ctx, file);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_load_client_CA_file$MH() {
- return RuntimeHelper.requireNonNull(constants$19.const$1,"SSL_load_client_CA_file");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* struct stack_st_X509_NAME* SSL_load_client_CA_file(char* file);
* }
*/
+ public static MethodHandle SSL_load_client_CA_file$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_load_client_CA_file"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment SSL_load_client_CA_file(MemorySegment file) {
var mh$ = SSL_load_client_CA_file$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(file);
+ return (MemorySegment) mh$.invokeExact(file);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_add_file_cert_subjects_to_stack$MH() {
- return RuntimeHelper.requireNonNull(constants$19.const$2,"SSL_add_file_cert_subjects_to_stack");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_add_file_cert_subjects_to_stack(struct stack_st_X509_NAME* stackCAs, char* file);
* }
*/
+ public static MethodHandle SSL_add_file_cert_subjects_to_stack$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_add_file_cert_subjects_to_stack"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_add_file_cert_subjects_to_stack(MemorySegment stackCAs, MemorySegment file) {
var mh$ = SSL_add_file_cert_subjects_to_stack$MH();
try {
- return (int)mh$.invokeExact(stackCAs, file);
+ return (int) mh$.invokeExact(stackCAs, file);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_SESSION_get_time$MH() {
- return RuntimeHelper.requireNonNull(constants$19.const$3,"SSL_SESSION_get_time");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* long SSL_SESSION_get_time(const SSL_SESSION* s);
* }
*/
+ public static MethodHandle SSL_SESSION_get_time$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_LONG,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_SESSION_get_time"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static long SSL_SESSION_get_time(MemorySegment s) {
var mh$ = SSL_SESSION_get_time$MH();
try {
- return (long)mh$.invokeExact(s);
+ return (long) mh$.invokeExact(s);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_SESSION_get_id$MH() {
- return RuntimeHelper.requireNonNull(constants$19.const$4,"SSL_SESSION_get_id");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* unsigned char* SSL_SESSION_get_id(const SSL_SESSION* s, unsigned int* len);
* }
*/
+ public static MethodHandle SSL_SESSION_get_id$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_SESSION_get_id"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment SSL_SESSION_get_id(MemorySegment s, MemorySegment len) {
var mh$ = SSL_SESSION_get_id$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(s, len);
+ return (MemorySegment) mh$.invokeExact(s, len);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_get1_peer_certificate$MH() {
- return RuntimeHelper.requireNonNull(constants$19.const$5,"SSL_get1_peer_certificate");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* X509* SSL_get1_peer_certificate(const SSL* s);
* }
*/
+ public static MethodHandle SSL_get1_peer_certificate$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_get1_peer_certificate"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment SSL_get1_peer_certificate(MemorySegment s) {
var mh$ = SSL_get1_peer_certificate$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(s);
+ return (MemorySegment) mh$.invokeExact(s);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_get_peer_cert_chain$MH() {
- return RuntimeHelper.requireNonNull(constants$20.const$0,"SSL_get_peer_cert_chain");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* struct stack_st_X509* SSL_get_peer_cert_chain(const SSL* s);
* }
*/
+ public static MethodHandle SSL_get_peer_cert_chain$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_get_peer_cert_chain"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment SSL_get_peer_cert_chain(MemorySegment s) {
var mh$ = SSL_get_peer_cert_chain$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(s);
+ return (MemorySegment) mh$.invokeExact(s);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_set_verify$MH() {
- return RuntimeHelper.requireNonNull(constants$20.const$1,"SSL_CTX_set_verify");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void SSL_CTX_set_verify(SSL_CTX* ctx, int mode, SSL_verify_cb callback);
* }
*/
+ public static MethodHandle SSL_CTX_set_verify$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER,
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_set_verify"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void SSL_CTX_set_verify(MemorySegment ctx, int mode, MemorySegment callback) {
var mh$ = SSL_CTX_set_verify$MH();
try {
mh$.invokeExact(ctx, mode, callback);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_set_cert_verify_callback$MH() {
- return RuntimeHelper.requireNonNull(constants$20.const$4,"SSL_CTX_set_cert_verify_callback");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void SSL_CTX_set_cert_verify_callback(SSL_CTX* ctx, int (*cb)(X509_STORE_CTX*,void*), void* arg);
* }
*/
+ public static MethodHandle SSL_CTX_set_cert_verify_callback$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_set_cert_verify_callback"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void SSL_CTX_set_cert_verify_callback(MemorySegment ctx, MemorySegment cb, MemorySegment arg) {
var mh$ = SSL_CTX_set_cert_verify_callback$MH();
try {
mh$.invokeExact(ctx, cb, arg);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_use_PrivateKey$MH() {
- return RuntimeHelper.requireNonNull(constants$20.const$5,"SSL_CTX_use_PrivateKey");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_CTX_use_PrivateKey(SSL_CTX* ctx, EVP_PKEY* pkey);
* }
*/
+ public static MethodHandle SSL_CTX_use_PrivateKey$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_use_PrivateKey"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_CTX_use_PrivateKey(MemorySegment ctx, MemorySegment pkey) {
var mh$ = SSL_CTX_use_PrivateKey$MH();
try {
- return (int)mh$.invokeExact(ctx, pkey);
+ return (int) mh$.invokeExact(ctx, pkey);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_use_certificate$MH() {
- return RuntimeHelper.requireNonNull(constants$21.const$0,"SSL_CTX_use_certificate");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_CTX_use_certificate(SSL_CTX* ctx, X509* x);
* }
*/
+ public static MethodHandle SSL_CTX_use_certificate$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_use_certificate"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_CTX_use_certificate(MemorySegment ctx, MemorySegment x) {
var mh$ = SSL_CTX_use_certificate$MH();
try {
- return (int)mh$.invokeExact(ctx, x);
+ return (int) mh$.invokeExact(ctx, x);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_set_default_passwd_cb$MH() {
- return RuntimeHelper.requireNonNull(constants$21.const$2,"SSL_CTX_set_default_passwd_cb");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void SSL_CTX_set_default_passwd_cb(SSL_CTX* ctx, pem_password_cb* cb);
* }
*/
+ public static MethodHandle SSL_CTX_set_default_passwd_cb$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_set_default_passwd_cb"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void SSL_CTX_set_default_passwd_cb(MemorySegment ctx, MemorySegment cb) {
var mh$ = SSL_CTX_set_default_passwd_cb$MH();
try {
mh$.invokeExact(ctx, cb);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_check_private_key$MH() {
- return RuntimeHelper.requireNonNull(constants$21.const$3,"SSL_CTX_check_private_key");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_CTX_check_private_key(const SSL_CTX* ctx);
* }
*/
+ public static MethodHandle SSL_CTX_check_private_key$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_check_private_key"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_CTX_check_private_key(MemorySegment ctx) {
var mh$ = SSL_CTX_check_private_key$MH();
try {
- return (int)mh$.invokeExact(ctx);
+ return (int) mh$.invokeExact(ctx);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_set_session_id_context$MH() {
- return RuntimeHelper.requireNonNull(constants$21.const$4,"SSL_CTX_set_session_id_context");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_CTX_set_session_id_context(SSL_CTX* ctx, unsigned char* sid_ctx, unsigned int sid_ctx_len);
* }
*/
+ public static MethodHandle SSL_CTX_set_session_id_context$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ JAVA_INT
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_set_session_id_context"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_CTX_set_session_id_context(MemorySegment ctx, MemorySegment sid_ctx, int sid_ctx_len) {
var mh$ = SSL_CTX_set_session_id_context$MH();
try {
- return (int)mh$.invokeExact(ctx, sid_ctx, sid_ctx_len);
+ return (int) mh$.invokeExact(ctx, sid_ctx, sid_ctx_len);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_new$MH() {
- return RuntimeHelper.requireNonNull(constants$21.const$5,"SSL_new");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* SSL* SSL_new(SSL_CTX* ctx);
* }
*/
+ public static MethodHandle SSL_new$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_new"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment SSL_new(MemorySegment ctx) {
var mh$ = SSL_new$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(ctx);
+ return (MemorySegment) mh$.invokeExact(ctx);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_free$MH() {
- return RuntimeHelper.requireNonNull(constants$22.const$0,"SSL_free");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void SSL_free(SSL* ssl);
* }
*/
+ public static MethodHandle SSL_free$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_free"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void SSL_free(MemorySegment ssl) {
var mh$ = SSL_free$MH();
try {
mh$.invokeExact(ssl);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_read$MH() {
- return RuntimeHelper.requireNonNull(constants$22.const$1,"SSL_read");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_read(SSL* ssl, void* buf, int num);
* }
*/
+ public static MethodHandle SSL_read$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ JAVA_INT
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_read"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_read(MemorySegment ssl, MemorySegment buf, int num) {
var mh$ = SSL_read$MH();
try {
- return (int)mh$.invokeExact(ssl, buf, num);
+ return (int) mh$.invokeExact(ssl, buf, num);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_write$MH() {
- return RuntimeHelper.requireNonNull(constants$22.const$2,"SSL_write");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_write(SSL* ssl, void* buf, int num);
* }
*/
+ public static MethodHandle SSL_write$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ JAVA_INT
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_write"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_write(MemorySegment ssl, MemorySegment buf, int num) {
var mh$ = SSL_write$MH();
try {
- return (int)mh$.invokeExact(ssl, buf, num);
+ return (int) mh$.invokeExact(ssl, buf, num);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_ctrl$MH() {
- return RuntimeHelper.requireNonNull(constants$22.const$3,"SSL_CTX_ctrl");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* long SSL_CTX_ctrl(SSL_CTX* ctx, int cmd, long larg, void* parg);
* }
*/
+ public static MethodHandle SSL_CTX_ctrl$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_LONG,
+ openssl_h.C_POINTER,
+ JAVA_INT,
+ JAVA_LONG,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_ctrl"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static long SSL_CTX_ctrl(MemorySegment ctx, int cmd, long larg, MemorySegment parg) {
var mh$ = SSL_CTX_ctrl$MH();
try {
- return (long)mh$.invokeExact(ctx, cmd, larg, parg);
+ return (long) mh$.invokeExact(ctx, cmd, larg, parg);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_get_version$MH() {
- return RuntimeHelper.requireNonNull(constants$22.const$4,"SSL_get_version");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* char* SSL_get_version(const SSL* s);
* }
*/
+ public static MethodHandle SSL_get_version$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_get_version"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment SSL_get_version(MemorySegment s) {
var mh$ = SSL_get_version$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(s);
+ return (MemorySegment) mh$.invokeExact(s);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle TLS_server_method$MH() {
- return RuntimeHelper.requireNonNull(constants$22.const$5,"TLS_server_method");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* const SSL_METHOD* TLS_server_method();
* }
*/
+ public static MethodHandle TLS_server_method$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("TLS_server_method"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment TLS_server_method() {
var mh$ = TLS_server_method$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact();
+ return (MemorySegment) mh$.invokeExact();
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_get_ciphers$MH() {
- return RuntimeHelper.requireNonNull(constants$23.const$0,"SSL_get_ciphers");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* struct stack_st_SSL_CIPHER* SSL_get_ciphers(const SSL* s);
* }
*/
+ public static MethodHandle SSL_get_ciphers$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_get_ciphers"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment SSL_get_ciphers(MemorySegment s) {
var mh$ = SSL_get_ciphers$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(s);
+ return (MemorySegment) mh$.invokeExact(s);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_get_ciphers$MH() {
- return RuntimeHelper.requireNonNull(constants$23.const$1,"SSL_CTX_get_ciphers");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* struct stack_st_SSL_CIPHER* SSL_CTX_get_ciphers(const SSL_CTX* ctx);
* }
*/
+ public static MethodHandle SSL_CTX_get_ciphers$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_get_ciphers"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment SSL_CTX_get_ciphers(MemorySegment ctx) {
var mh$ = SSL_CTX_get_ciphers$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(ctx);
+ return (MemorySegment) mh$.invokeExact(ctx);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_do_handshake$MH() {
- return RuntimeHelper.requireNonNull(constants$23.const$2,"SSL_do_handshake");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_do_handshake(SSL* s);
* }
*/
+ public static MethodHandle SSL_do_handshake$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_do_handshake"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_do_handshake(MemorySegment s) {
var mh$ = SSL_do_handshake$MH();
try {
- return (int)mh$.invokeExact(s);
+ return (int) mh$.invokeExact(s);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_renegotiate$MH() {
- return RuntimeHelper.requireNonNull(constants$23.const$3,"SSL_renegotiate");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_renegotiate(SSL* s);
* }
*/
+ public static MethodHandle SSL_renegotiate$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_renegotiate"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_renegotiate(MemorySegment s) {
var mh$ = SSL_renegotiate$MH();
try {
- return (int)mh$.invokeExact(s);
+ return (int) mh$.invokeExact(s);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_renegotiate_pending$MH() {
- return RuntimeHelper.requireNonNull(constants$23.const$4,"SSL_renegotiate_pending");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_renegotiate_pending(const SSL* s);
* }
*/
+ public static MethodHandle SSL_renegotiate_pending$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_renegotiate_pending"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_renegotiate_pending(MemorySegment s) {
var mh$ = SSL_renegotiate_pending$MH();
try {
- return (int)mh$.invokeExact(s);
+ return (int) mh$.invokeExact(s);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_shutdown$MH() {
- return RuntimeHelper.requireNonNull(constants$23.const$5,"SSL_shutdown");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_shutdown(SSL* s);
* }
*/
+ public static MethodHandle SSL_shutdown$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_shutdown"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_shutdown(MemorySegment s) {
var mh$ = SSL_shutdown$MH();
try {
- return (int)mh$.invokeExact(s);
+ return (int) mh$.invokeExact(s);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_verify_client_post_handshake$MH() {
- return RuntimeHelper.requireNonNull(constants$24.const$0,"SSL_verify_client_post_handshake");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_verify_client_post_handshake(SSL* s);
* }
*/
+ public static MethodHandle SSL_verify_client_post_handshake$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_verify_client_post_handshake"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_verify_client_post_handshake(MemorySegment s) {
var mh$ = SSL_verify_client_post_handshake$MH();
try {
- return (int)mh$.invokeExact(s);
+ return (int) mh$.invokeExact(s);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_set_client_CA_list$MH() {
- return RuntimeHelper.requireNonNull(constants$24.const$1,"SSL_CTX_set_client_CA_list");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void SSL_CTX_set_client_CA_list(SSL_CTX* ctx, struct stack_st_X509_NAME* name_list);
* }
*/
+ public static MethodHandle SSL_CTX_set_client_CA_list$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_set_client_CA_list"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void SSL_CTX_set_client_CA_list(MemorySegment ctx, MemorySegment name_list) {
var mh$ = SSL_CTX_set_client_CA_list$MH();
try {
mh$.invokeExact(ctx, name_list);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_get_client_CA_list$MH() {
- return RuntimeHelper.requireNonNull(constants$24.const$2,"SSL_CTX_get_client_CA_list");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* struct stack_st_X509_NAME* SSL_CTX_get_client_CA_list(const SSL_CTX* s);
* }
*/
+ public static MethodHandle SSL_CTX_get_client_CA_list$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_get_client_CA_list"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment SSL_CTX_get_client_CA_list(MemorySegment s) {
var mh$ = SSL_CTX_get_client_CA_list$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(s);
+ return (MemorySegment) mh$.invokeExact(s);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_add_client_CA$MH() {
- return RuntimeHelper.requireNonNull(constants$24.const$3,"SSL_CTX_add_client_CA");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_CTX_add_client_CA(SSL_CTX* ctx, X509* x);
* }
*/
+ public static MethodHandle SSL_CTX_add_client_CA$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_add_client_CA"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_CTX_add_client_CA(MemorySegment ctx, MemorySegment x) {
var mh$ = SSL_CTX_add_client_CA$MH();
try {
- return (int)mh$.invokeExact(ctx, x);
+ return (int) mh$.invokeExact(ctx, x);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_set_connect_state$MH() {
- return RuntimeHelper.requireNonNull(constants$24.const$4,"SSL_set_connect_state");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void SSL_set_connect_state(SSL* s);
* }
*/
+ public static MethodHandle SSL_set_connect_state$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_set_connect_state"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void SSL_set_connect_state(MemorySegment s) {
var mh$ = SSL_set_connect_state$MH();
try {
mh$.invokeExact(s);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_set_accept_state$MH() {
- return RuntimeHelper.requireNonNull(constants$24.const$5,"SSL_set_accept_state");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void SSL_set_accept_state(SSL* s);
* }
*/
+ public static MethodHandle SSL_set_accept_state$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_set_accept_state"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void SSL_set_accept_state(MemorySegment s) {
var mh$ = SSL_set_accept_state$MH();
try {
mh$.invokeExact(s);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_get_privatekey$MH() {
- return RuntimeHelper.requireNonNull(constants$25.const$0,"SSL_get_privatekey");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* struct evp_pkey_st* SSL_get_privatekey(const SSL* ssl);
* }
*/
+ public static MethodHandle SSL_get_privatekey$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_get_privatekey"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment SSL_get_privatekey(MemorySegment ssl) {
var mh$ = SSL_get_privatekey$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(ssl);
+ return (MemorySegment) mh$.invokeExact(ssl);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_get_shutdown$MH() {
- return RuntimeHelper.requireNonNull(constants$25.const$1,"SSL_get_shutdown");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_get_shutdown(const SSL* ssl);
* }
*/
+ public static MethodHandle SSL_get_shutdown$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_get_shutdown"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_get_shutdown(MemorySegment ssl) {
var mh$ = SSL_get_shutdown$MH();
try {
- return (int)mh$.invokeExact(ssl);
+ return (int) mh$.invokeExact(ssl);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_set_default_verify_paths$MH() {
- return RuntimeHelper.requireNonNull(constants$25.const$2,"SSL_CTX_set_default_verify_paths");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_CTX_set_default_verify_paths(SSL_CTX* ctx);
* }
*/
+ public static MethodHandle SSL_CTX_set_default_verify_paths$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_set_default_verify_paths"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_CTX_set_default_verify_paths(MemorySegment ctx) {
var mh$ = SSL_CTX_set_default_verify_paths$MH();
try {
- return (int)mh$.invokeExact(ctx);
+ return (int) mh$.invokeExact(ctx);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_load_verify_locations$MH() {
- return RuntimeHelper.requireNonNull(constants$25.const$4,"SSL_CTX_load_verify_locations");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_CTX_load_verify_locations(SSL_CTX* ctx, char* CAfile, char* CApath);
* }
*/
+ public static MethodHandle SSL_CTX_load_verify_locations$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_load_verify_locations"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_CTX_load_verify_locations(MemorySegment ctx, MemorySegment CAfile, MemorySegment CApath) {
var mh$ = SSL_CTX_load_verify_locations$MH();
try {
- return (int)mh$.invokeExact(ctx, CAfile, CApath);
+ return (int) mh$.invokeExact(ctx, CAfile, CApath);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_get_session$MH() {
- return RuntimeHelper.requireNonNull(constants$25.const$5,"SSL_get_session");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* SSL_SESSION* SSL_get_session(const SSL* ssl);
* }
*/
+ public static MethodHandle SSL_get_session$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_get_session"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment SSL_get_session(MemorySegment ssl) {
var mh$ = SSL_get_session$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(ssl);
+ return (MemorySegment) mh$.invokeExact(ssl);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_set_info_callback$MH() {
- return RuntimeHelper.requireNonNull(constants$26.const$3,"SSL_set_info_callback");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void SSL_set_info_callback(SSL* ssl, void (*cb)(const SSL*,int,int));
* }
*/
+ public static MethodHandle SSL_set_info_callback$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_set_info_callback"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void SSL_set_info_callback(MemorySegment ssl, MemorySegment cb) {
var mh$ = SSL_set_info_callback$MH();
try {
mh$.invokeExact(ssl, cb);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_set_verify_result$MH() {
- return RuntimeHelper.requireNonNull(constants$26.const$5,"SSL_set_verify_result");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void SSL_set_verify_result(SSL* ssl, long v);
* }
*/
+ public static MethodHandle SSL_set_verify_result$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER,
+ JAVA_LONG
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_set_verify_result"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void SSL_set_verify_result(MemorySegment ssl, long v) {
var mh$ = SSL_set_verify_result$MH();
try {
mh$.invokeExact(ssl, v);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_get_ex_data_X509_STORE_CTX_idx$MH() {
- return RuntimeHelper.requireNonNull(constants$27.const$1,"SSL_get_ex_data_X509_STORE_CTX_idx");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_get_ex_data_X509_STORE_CTX_idx();
* }
*/
+ public static MethodHandle SSL_get_ex_data_X509_STORE_CTX_idx$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_get_ex_data_X509_STORE_CTX_idx"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_get_ex_data_X509_STORE_CTX_idx() {
var mh$ = SSL_get_ex_data_X509_STORE_CTX_idx$MH();
try {
- return (int)mh$.invokeExact();
+ return (int) mh$.invokeExact();
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CTX_set_tmp_dh_callback$MH() {
- return RuntimeHelper.requireNonNull(constants$27.const$5,"SSL_CTX_set_tmp_dh_callback");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void SSL_CTX_set_tmp_dh_callback(SSL_CTX* ctx, DH* (*dh)(SSL*,int,int));
* }
*/
- @Deprecated
+ public static MethodHandle SSL_CTX_set_tmp_dh_callback$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CTX_set_tmp_dh_callback"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void SSL_CTX_set_tmp_dh_callback(MemorySegment ctx, MemorySegment dh) {
var mh$ = SSL_CTX_set_tmp_dh_callback$MH();
try {
mh$.invokeExact(ctx, dh);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CONF_CTX_new$MH() {
- return RuntimeHelper.requireNonNull(constants$28.const$0,"SSL_CONF_CTX_new");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* SSL_CONF_CTX* SSL_CONF_CTX_new();
* }
*/
+ public static MethodHandle SSL_CONF_CTX_new$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CONF_CTX_new"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment SSL_CONF_CTX_new() {
var mh$ = SSL_CONF_CTX_new$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact();
+ return (MemorySegment) mh$.invokeExact();
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CONF_CTX_finish$MH() {
- return RuntimeHelper.requireNonNull(constants$28.const$1,"SSL_CONF_CTX_finish");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_CONF_CTX_finish(SSL_CONF_CTX* cctx);
* }
*/
+ public static MethodHandle SSL_CONF_CTX_finish$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CONF_CTX_finish"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_CONF_CTX_finish(MemorySegment cctx) {
var mh$ = SSL_CONF_CTX_finish$MH();
try {
- return (int)mh$.invokeExact(cctx);
+ return (int) mh$.invokeExact(cctx);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CONF_CTX_free$MH() {
- return RuntimeHelper.requireNonNull(constants$28.const$2,"SSL_CONF_CTX_free");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void SSL_CONF_CTX_free(SSL_CONF_CTX* cctx);
* }
*/
+ public static MethodHandle SSL_CONF_CTX_free$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CONF_CTX_free"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void SSL_CONF_CTX_free(MemorySegment cctx) {
var mh$ = SSL_CONF_CTX_free$MH();
try {
mh$.invokeExact(cctx);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CONF_CTX_set_flags$MH() {
- return RuntimeHelper.requireNonNull(constants$28.const$4,"SSL_CONF_CTX_set_flags");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* unsigned int SSL_CONF_CTX_set_flags(SSL_CONF_CTX* cctx, unsigned int flags);
* }
*/
+ public static MethodHandle SSL_CONF_CTX_set_flags$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ JAVA_INT
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CONF_CTX_set_flags"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_CONF_CTX_set_flags(MemorySegment cctx, int flags) {
var mh$ = SSL_CONF_CTX_set_flags$MH();
try {
- return (int)mh$.invokeExact(cctx, flags);
+ return (int) mh$.invokeExact(cctx, flags);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CONF_CTX_set_ssl_ctx$MH() {
- return RuntimeHelper.requireNonNull(constants$28.const$5,"SSL_CONF_CTX_set_ssl_ctx");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void SSL_CONF_CTX_set_ssl_ctx(SSL_CONF_CTX* cctx, SSL_CTX* ctx);
* }
*/
+ public static MethodHandle SSL_CONF_CTX_set_ssl_ctx$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CONF_CTX_set_ssl_ctx"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void SSL_CONF_CTX_set_ssl_ctx(MemorySegment cctx, MemorySegment ctx) {
var mh$ = SSL_CONF_CTX_set_ssl_ctx$MH();
try {
mh$.invokeExact(cctx, ctx);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CONF_cmd$MH() {
- return RuntimeHelper.requireNonNull(constants$29.const$0,"SSL_CONF_cmd");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_CONF_cmd(SSL_CONF_CTX* cctx, char* cmd, char* value);
* }
*/
+ public static MethodHandle SSL_CONF_cmd$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CONF_cmd"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_CONF_cmd(MemorySegment cctx, MemorySegment cmd, MemorySegment value) {
var mh$ = SSL_CONF_cmd$MH();
try {
- return (int)mh$.invokeExact(cctx, cmd, value);
+ return (int) mh$.invokeExact(cctx, cmd, value);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle SSL_CONF_cmd_value_type$MH() {
- return RuntimeHelper.requireNonNull(constants$29.const$1,"SSL_CONF_cmd_value_type");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int SSL_CONF_cmd_value_type(SSL_CONF_CTX* cctx, char* cmd);
* }
*/
+ public static MethodHandle SSL_CONF_cmd_value_type$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("SSL_CONF_cmd_value_type"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int SSL_CONF_cmd_value_type(MemorySegment cctx, MemorySegment cmd) {
var mh$ = SSL_CONF_cmd_value_type$MH();
try {
- return (int)mh$.invokeExact(cctx, cmd);
+ return (int) mh$.invokeExact(cctx, cmd);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle OPENSSL_init_ssl$MH() {
- return RuntimeHelper.requireNonNull(constants$29.const$3,"OPENSSL_init_ssl");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS* settings);
* }
*/
+ public static MethodHandle OPENSSL_init_ssl$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ JAVA_LONG,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("OPENSSL_init_ssl"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int OPENSSL_init_ssl(long opts, MemorySegment settings) {
var mh$ = OPENSSL_init_ssl$MH();
try {
- return (int)mh$.invokeExact(opts, settings);
+ return (int) mh$.invokeExact(opts, settings);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle ERR_get_error$MH() {
- return RuntimeHelper.requireNonNull(constants$29.const$4,"ERR_get_error");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* unsigned long ERR_get_error();
* }
*/
+ public static MethodHandle ERR_get_error$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_LONG );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("ERR_get_error"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static long ERR_get_error() {
var mh$ = ERR_get_error$MH();
try {
- return (long)mh$.invokeExact();
+ return (long) mh$.invokeExact();
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle ERR_peek_last_error$MH() {
- return RuntimeHelper.requireNonNull(constants$29.const$5,"ERR_peek_last_error");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* unsigned long ERR_peek_last_error();
* }
*/
+ public static MethodHandle ERR_peek_last_error$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_LONG );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("ERR_peek_last_error"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static long ERR_peek_last_error() {
var mh$ = ERR_peek_last_error$MH();
try {
- return (long)mh$.invokeExact();
+ return (long) mh$.invokeExact();
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle ERR_clear_error$MH() {
- return RuntimeHelper.requireNonNull(constants$30.const$1,"ERR_clear_error");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void ERR_clear_error();
* }
*/
+ public static MethodHandle ERR_clear_error$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("ERR_clear_error"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void ERR_clear_error() {
var mh$ = ERR_clear_error$MH();
try {
mh$.invokeExact();
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle ERR_error_string$MH() {
- return RuntimeHelper.requireNonNull(constants$30.const$3,"ERR_error_string");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* char* ERR_error_string(unsigned long e, char* buf);
* }
*/
+ public static MethodHandle ERR_error_string$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ JAVA_LONG,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("ERR_error_string"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment ERR_error_string(long e, MemorySegment buf) {
var mh$ = ERR_error_string$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(e, buf);
+ return (MemorySegment) mh$.invokeExact(e, buf);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle PKCS12_verify_mac$MH() {
- return RuntimeHelper.requireNonNull(constants$30.const$4,"PKCS12_verify_mac");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int PKCS12_verify_mac(PKCS12* p12, char* pass, int passlen);
* }
*/
+ public static MethodHandle PKCS12_verify_mac$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ JAVA_INT
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("PKCS12_verify_mac"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int PKCS12_verify_mac(MemorySegment p12, MemorySegment pass, int passlen) {
var mh$ = PKCS12_verify_mac$MH();
try {
- return (int)mh$.invokeExact(p12, pass, passlen);
+ return (int) mh$.invokeExact(p12, pass, passlen);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle PKCS12_free$MH() {
- return RuntimeHelper.requireNonNull(constants$30.const$5,"PKCS12_free");
- }
- /**
- * {@snippet :
- * void PKCS12_free(PKCS12* a);
- * }
- */
- public static void PKCS12_free(MemorySegment a) {
- var mh$ = PKCS12_free$MH();
- try {
- mh$.invokeExact(a);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
- public static MethodHandle PKCS12_parse$MH() {
- return RuntimeHelper.requireNonNull(constants$31.const$1,"PKCS12_parse");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int PKCS12_parse(PKCS12* p12, char* pass, EVP_PKEY** pkey, X509** cert, struct stack_st_X509** ca);
* }
*/
+ public static MethodHandle PKCS12_parse$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("PKCS12_parse"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int PKCS12_parse(MemorySegment p12, MemorySegment pass, MemorySegment pkey, MemorySegment cert, MemorySegment ca) {
var mh$ = PKCS12_parse$MH();
try {
- return (int)mh$.invokeExact(p12, pass, pkey, cert, ca);
+ return (int) mh$.invokeExact(p12, pass, pkey, cert, ca);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle d2i_PKCS12_bio$MH() {
- return RuntimeHelper.requireNonNull(constants$31.const$2,"d2i_PKCS12_bio");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* PKCS12* d2i_PKCS12_bio(BIO* bp, PKCS12** p12);
* }
*/
+ public static MethodHandle d2i_PKCS12_bio$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("d2i_PKCS12_bio"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment d2i_PKCS12_bio(MemorySegment bp, MemorySegment p12) {
var mh$ = d2i_PKCS12_bio$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(bp, p12);
+ return (MemorySegment) mh$.invokeExact(bp, p12);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle RAND_seed$MH() {
- return RuntimeHelper.requireNonNull(constants$31.const$3,"RAND_seed");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* void RAND_seed(void* buf, int num);
* }
*/
+ public static MethodHandle RAND_seed$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ openssl_h.C_POINTER,
+ JAVA_INT
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("RAND_seed"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static void RAND_seed(MemorySegment buf, int num) {
var mh$ = RAND_seed$MH();
try {
mh$.invokeExact(buf, num);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle RAND_load_file$MH() {
- return RuntimeHelper.requireNonNull(constants$31.const$4,"RAND_load_file");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int RAND_load_file(char* file, long max_bytes);
* }
*/
+ public static MethodHandle RAND_load_file$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ JAVA_LONG
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("RAND_load_file"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int RAND_load_file(MemorySegment file, long max_bytes) {
var mh$ = RAND_load_file$MH();
try {
- return (int)mh$.invokeExact(file, max_bytes);
+ return (int) mh$.invokeExact(file, max_bytes);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle X509_check_issued$MH() {
- return RuntimeHelper.requireNonNull(constants$31.const$5,"X509_check_issued");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int X509_check_issued(X509* issuer, X509* subject);
* }
*/
+ public static MethodHandle X509_check_issued$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("X509_check_issued"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int X509_check_issued(MemorySegment issuer, MemorySegment subject) {
var mh$ = X509_check_issued$MH();
try {
- return (int)mh$.invokeExact(issuer, subject);
+ return (int) mh$.invokeExact(issuer, subject);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle ENGINE_by_id$MH() {
- return RuntimeHelper.requireNonNull(constants$32.const$0,"ENGINE_by_id");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* ENGINE* ENGINE_by_id(char* id);
* }
*/
- @Deprecated
+ public static MethodHandle ENGINE_by_id$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("ENGINE_by_id"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment ENGINE_by_id(MemorySegment id) {
var mh$ = ENGINE_by_id$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(id);
+ return (MemorySegment) mh$.invokeExact(id);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle ENGINE_register_all_complete$MH() {
- return RuntimeHelper.requireNonNull(constants$32.const$1,"ENGINE_register_all_complete");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int ENGINE_register_all_complete();
* }
*/
- @Deprecated
+ public static MethodHandle ENGINE_register_all_complete$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("ENGINE_register_all_complete"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int ENGINE_register_all_complete() {
var mh$ = ENGINE_register_all_complete$MH();
try {
- return (int)mh$.invokeExact();
+ return (int) mh$.invokeExact();
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle ENGINE_ctrl_cmd_string$MH() {
- return RuntimeHelper.requireNonNull(constants$32.const$3,"ENGINE_ctrl_cmd_string");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int ENGINE_ctrl_cmd_string(ENGINE* e, char* cmd_name, char* arg, int cmd_optional);
* }
*/
- @Deprecated
+ public static MethodHandle ENGINE_ctrl_cmd_string$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ JAVA_INT
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("ENGINE_ctrl_cmd_string"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int ENGINE_ctrl_cmd_string(MemorySegment e, MemorySegment cmd_name, MemorySegment arg, int cmd_optional) {
var mh$ = ENGINE_ctrl_cmd_string$MH();
try {
- return (int)mh$.invokeExact(e, cmd_name, arg, cmd_optional);
+ return (int) mh$.invokeExact(e, cmd_name, arg, cmd_optional);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle ENGINE_free$MH() {
- return RuntimeHelper.requireNonNull(constants$32.const$4,"ENGINE_free");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int ENGINE_free(ENGINE* e);
* }
*/
- @Deprecated
+ public static MethodHandle ENGINE_free$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("ENGINE_free"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int ENGINE_free(MemorySegment e) {
var mh$ = ENGINE_free$MH();
try {
- return (int)mh$.invokeExact(e);
+ return (int) mh$.invokeExact(e);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle ENGINE_load_private_key$MH() {
- return RuntimeHelper.requireNonNull(constants$32.const$5,"ENGINE_load_private_key");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* EVP_PKEY* ENGINE_load_private_key(ENGINE* e, char* key_id, UI_METHOD* ui_method, void* callback_data);
* }
*/
- @Deprecated
+ public static MethodHandle ENGINE_load_private_key$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("ENGINE_load_private_key"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment ENGINE_load_private_key(MemorySegment e, MemorySegment key_id, MemorySegment ui_method, MemorySegment callback_data) {
var mh$ = ENGINE_load_private_key$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(e, key_id, ui_method, callback_data);
+ return (MemorySegment) mh$.invokeExact(e, key_id, ui_method, callback_data);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle ENGINE_set_default$MH() {
- return RuntimeHelper.requireNonNull(constants$33.const$0,"ENGINE_set_default");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int ENGINE_set_default(ENGINE* e, unsigned int flags);
* }
*/
- @Deprecated
+ public static MethodHandle ENGINE_set_default$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ JAVA_INT
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("ENGINE_set_default"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int ENGINE_set_default(MemorySegment e, int flags) {
var mh$ = ENGINE_set_default$MH();
try {
- return (int)mh$.invokeExact(e, flags);
+ return (int) mh$.invokeExact(e, flags);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle OCSP_cert_to_id$MH() {
- return RuntimeHelper.requireNonNull(constants$33.const$1,"OCSP_cert_to_id");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* OCSP_CERTID* OCSP_cert_to_id(const EVP_MD* dgst, const X509* subject, const X509* issuer);
* }
*/
+ public static MethodHandle OCSP_cert_to_id$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("OCSP_cert_to_id"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment OCSP_cert_to_id(MemorySegment dgst, MemorySegment subject, MemorySegment issuer) {
var mh$ = OCSP_cert_to_id$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(dgst, subject, issuer);
+ return (MemorySegment) mh$.invokeExact(dgst, subject, issuer);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle OCSP_request_add0_id$MH() {
- return RuntimeHelper.requireNonNull(constants$33.const$2,"OCSP_request_add0_id");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* OCSP_ONEREQ* OCSP_request_add0_id(OCSP_REQUEST* req, OCSP_CERTID* cid);
* }
*/
+ public static MethodHandle OCSP_request_add0_id$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("OCSP_request_add0_id"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment OCSP_request_add0_id(MemorySegment req, MemorySegment cid) {
var mh$ = OCSP_request_add0_id$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(req, cid);
+ return (MemorySegment) mh$.invokeExact(req, cid);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle OCSP_response_status$MH() {
- return RuntimeHelper.requireNonNull(constants$33.const$3,"OCSP_response_status");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int OCSP_response_status(OCSP_RESPONSE* resp);
* }
*/
+ public static MethodHandle OCSP_response_status$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("OCSP_response_status"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int OCSP_response_status(MemorySegment resp) {
var mh$ = OCSP_response_status$MH();
try {
- return (int)mh$.invokeExact(resp);
+ return (int) mh$.invokeExact(resp);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle OCSP_response_get1_basic$MH() {
- return RuntimeHelper.requireNonNull(constants$33.const$4,"OCSP_response_get1_basic");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* OCSP_BASICRESP* OCSP_response_get1_basic(OCSP_RESPONSE* resp);
* }
*/
+ public static MethodHandle OCSP_response_get1_basic$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("OCSP_response_get1_basic"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment OCSP_response_get1_basic(MemorySegment resp) {
var mh$ = OCSP_response_get1_basic$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(resp);
+ return (MemorySegment) mh$.invokeExact(resp);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle OCSP_resp_get0$MH() {
- return RuntimeHelper.requireNonNull(constants$33.const$5,"OCSP_resp_get0");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* OCSP_SINGLERESP* OCSP_resp_get0(OCSP_BASICRESP* bs, int idx);
* }
*/
+ public static MethodHandle OCSP_resp_get0$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ JAVA_INT
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("OCSP_resp_get0"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment OCSP_resp_get0(MemorySegment bs, int idx) {
var mh$ = OCSP_resp_get0$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(bs, idx);
+ return (MemorySegment) mh$.invokeExact(bs, idx);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle OCSP_resp_find$MH() {
- return RuntimeHelper.requireNonNull(constants$34.const$0,"OCSP_resp_find");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int OCSP_resp_find(OCSP_BASICRESP* bs, OCSP_CERTID* id, int last);
* }
*/
+ public static MethodHandle OCSP_resp_find$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ JAVA_INT
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("OCSP_resp_find"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int OCSP_resp_find(MemorySegment bs, MemorySegment id, int last) {
var mh$ = OCSP_resp_find$MH();
try {
- return (int)mh$.invokeExact(bs, id, last);
+ return (int) mh$.invokeExact(bs, id, last);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle OCSP_single_get0_status$MH() {
- return RuntimeHelper.requireNonNull(constants$34.const$1,"OCSP_single_get0_status");
- }
/**
- * {@snippet :
+ * {@snippet lang=c :
* int OCSP_single_get0_status(OCSP_SINGLERESP* single, int* reason, ASN1_GENERALIZEDTIME** revtime, ASN1_GENERALIZEDTIME** thisupd, ASN1_GENERALIZEDTIME** nextupd);
* }
*/
+ public static MethodHandle OCSP_single_get0_status$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ JAVA_INT,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("OCSP_single_get0_status"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static int OCSP_single_get0_status(MemorySegment single, MemorySegment reason, MemorySegment revtime, MemorySegment thisupd, MemorySegment nextupd) {
var mh$ = OCSP_single_get0_status$MH();
try {
- return (int)mh$.invokeExact(single, reason, revtime, thisupd, nextupd);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
- public static MethodHandle OCSP_BASICRESP_free$MH() {
- return RuntimeHelper.requireNonNull(constants$34.const$2,"OCSP_BASICRESP_free");
- }
- /**
- * {@snippet :
- * void OCSP_BASICRESP_free(OCSP_BASICRESP* a);
- * }
- */
- public static void OCSP_BASICRESP_free(MemorySegment a) {
- var mh$ = OCSP_BASICRESP_free$MH();
- try {
- mh$.invokeExact(a);
+ return (int) mh$.invokeExact(single, reason, revtime, thisupd, nextupd);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
- public static MethodHandle OCSP_RESPONSE_free$MH() {
- return RuntimeHelper.requireNonNull(constants$34.const$3,"OCSP_RESPONSE_free");
- }
/**
- * {@snippet :
- * void OCSP_RESPONSE_free(OCSP_RESPONSE* a);
- * }
- */
- public static void OCSP_RESPONSE_free(MemorySegment a) {
- var mh$ = OCSP_RESPONSE_free$MH();
- try {
- mh$.invokeExact(a);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
- public static MethodHandle d2i_OCSP_RESPONSE$MH() {
- return RuntimeHelper.requireNonNull(constants$34.const$4,"d2i_OCSP_RESPONSE");
- }
- /**
- * {@snippet :
- * OCSP_RESPONSE* d2i_OCSP_RESPONSE(OCSP_RESPONSE** a, unsigned char** in, long len);
- * }
- */
- public static MemorySegment d2i_OCSP_RESPONSE(MemorySegment a, MemorySegment in, long len) {
- var mh$ = d2i_OCSP_RESPONSE$MH();
- try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(a, in, len);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
- public static MethodHandle OCSP_CERTID_free$MH() {
- return RuntimeHelper.requireNonNull(constants$34.const$5,"OCSP_CERTID_free");
- }
- /**
- * {@snippet :
- * void OCSP_CERTID_free(OCSP_CERTID* a);
- * }
- */
- public static void OCSP_CERTID_free(MemorySegment a) {
- var mh$ = OCSP_CERTID_free$MH();
- try {
- mh$.invokeExact(a);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
- public static MethodHandle OCSP_REQUEST_new$MH() {
- return RuntimeHelper.requireNonNull(constants$35.const$0,"OCSP_REQUEST_new");
- }
- /**
- * {@snippet :
- * OCSP_REQUEST* OCSP_REQUEST_new();
- * }
- */
- public static MemorySegment OCSP_REQUEST_new() {
- var mh$ = OCSP_REQUEST_new$MH();
- try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact();
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
- public static MethodHandle OCSP_REQUEST_free$MH() {
- return RuntimeHelper.requireNonNull(constants$35.const$1,"OCSP_REQUEST_free");
- }
- /**
- * {@snippet :
- * void OCSP_REQUEST_free(OCSP_REQUEST* a);
- * }
- */
- public static void OCSP_REQUEST_free(MemorySegment a) {
- var mh$ = OCSP_REQUEST_free$MH();
- try {
- mh$.invokeExact(a);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
- public static MethodHandle i2d_OCSP_REQUEST$MH() {
- return RuntimeHelper.requireNonNull(constants$35.const$2,"i2d_OCSP_REQUEST");
- }
- /**
- * {@snippet :
- * int i2d_OCSP_REQUEST(const OCSP_REQUEST* a, unsigned char** out);
- * }
- */
- public static int i2d_OCSP_REQUEST(MemorySegment a, MemorySegment out) {
- var mh$ = i2d_OCSP_REQUEST$MH();
- try {
- return (int)mh$.invokeExact(a, out);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
- public static MethodHandle OSSL_PROVIDER_get0_name$MH() {
- return RuntimeHelper.requireNonNull(constants$35.const$3,"OSSL_PROVIDER_get0_name");
- }
- /**
- * {@snippet :
+ * {@snippet lang=c :
* char* OSSL_PROVIDER_get0_name(const OSSL_PROVIDER* prov);
* }
*/
+ public static MethodHandle OSSL_PROVIDER_get0_name$MH() {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ openssl_h.C_POINTER,
+ openssl_h.C_POINTER
+ );
+
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
+ openssl_h.findOrThrow("OSSL_PROVIDER_get0_name"),
+ DESC);
+ }
+ return Holder.MH;
+ }
+
public static MemorySegment OSSL_PROVIDER_get0_name(MemorySegment prov) {
var mh$ = OSSL_PROVIDER_get0_name$MH();
try {
- return (java.lang.foreign.MemorySegment)mh$.invokeExact(prov);
+ return (MemorySegment) mh$.invokeExact(prov);
} catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
+ throw new AssertionError("should not reach here", ex$);
}
}
+ private static final MemorySegment OPENSSL_FILE = Arena.ofAuto().allocateFrom("/tmp/jextract$17086606898854816972.h");
+
/**
- * {@snippet :
- * #define OPENSSL_FILE "/tmp/jextract$5612544175128132323.h"
+ * {@snippet lang=c :
+ * #define OPENSSL_FILE "/tmp/jextract$17086606898854816972.h"
* }
*/
public static MemorySegment OPENSSL_FILE() {
- return constants$35.const$4;
+ return OPENSSL_FILE;
}
+ private static final int OPENSSL_LINE = (int)50L;
+
/**
- * {@snippet :
- * #define OPENSSL_LINE 49
+ * {@snippet lang=c :
+ * #define OPENSSL_LINE 50
* }
*/
public static int OPENSSL_LINE() {
- return (int)49L;
+ return OPENSSL_LINE;
}
+ private static final long OPENSSL_INIT_ENGINE_ALL_BUILTIN = 30208L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define OPENSSL_INIT_ENGINE_ALL_BUILTIN 30208
* }
*/
- @Deprecated
public static long OPENSSL_INIT_ENGINE_ALL_BUILTIN() {
- return 30208L;
+ return OPENSSL_INIT_ENGINE_ALL_BUILTIN;
}
+ private static final int EVP_PKEY_NONE = (int)0L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define EVP_PKEY_NONE 0
* }
*/
public static int EVP_PKEY_NONE() {
- return (int)0L;
+ return EVP_PKEY_NONE;
}
+ private static final int EVP_PKEY_RSA = (int)6L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define EVP_PKEY_RSA 6
* }
*/
public static int EVP_PKEY_RSA() {
- return (int)6L;
+ return EVP_PKEY_RSA;
}
+ private static final int EVP_PKEY_DSA = (int)116L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define EVP_PKEY_DSA 116
* }
*/
public static int EVP_PKEY_DSA() {
- return (int)116L;
+ return EVP_PKEY_DSA;
}
+ private static final MemorySegment PEM_STRING_ECPARAMETERS = Arena.ofAuto().allocateFrom("EC PARAMETERS");
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define PEM_STRING_ECPARAMETERS "EC PARAMETERS"
* }
*/
public static MemorySegment PEM_STRING_ECPARAMETERS() {
- return constants$35.const$5;
+ return PEM_STRING_ECPARAMETERS;
}
+ private static final long SSL_OP_NO_TICKET = 16384L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_OP_NO_TICKET 16384
* }
*/
public static long SSL_OP_NO_TICKET() {
- return 16384L;
+ return SSL_OP_NO_TICKET;
}
+ private static final long SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION = 65536L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION 65536
* }
*/
public static long SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION() {
- return 65536L;
+ return SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION;
}
+ private static final long SSL_OP_NO_COMPRESSION = 131072L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_OP_NO_COMPRESSION 131072
* }
*/
public static long SSL_OP_NO_COMPRESSION() {
- return 131072L;
+ return SSL_OP_NO_COMPRESSION;
}
+ private static final long SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION = 262144L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION 262144
* }
*/
public static long SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION() {
- return 262144L;
+ return SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION;
}
+ private static final long SSL_OP_CIPHER_SERVER_PREFERENCE = 4194304L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_OP_CIPHER_SERVER_PREFERENCE 4194304
* }
*/
public static long SSL_OP_CIPHER_SERVER_PREFERENCE() {
- return 4194304L;
+ return SSL_OP_CIPHER_SERVER_PREFERENCE;
}
+ private static final long SSL_OP_NO_SSLv3 = 33554432L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_OP_NO_SSLv3 33554432
* }
*/
public static long SSL_OP_NO_SSLv3() {
- return 33554432L;
+ return SSL_OP_NO_SSLv3;
}
+ private static final long SSL_OP_NO_TLSv1 = 67108864L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_OP_NO_TLSv1 67108864
* }
*/
public static long SSL_OP_NO_TLSv1() {
- return 67108864L;
+ return SSL_OP_NO_TLSv1;
}
+ private static final long SSL_OP_NO_TLSv1_2 = 134217728L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_OP_NO_TLSv1_2 134217728
* }
*/
public static long SSL_OP_NO_TLSv1_2() {
- return 134217728L;
+ return SSL_OP_NO_TLSv1_2;
}
+ private static final long SSL_OP_NO_TLSv1_1 = 268435456L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_OP_NO_TLSv1_1 268435456
* }
*/
public static long SSL_OP_NO_TLSv1_1() {
- return 268435456L;
+ return SSL_OP_NO_TLSv1_1;
}
+ private static final long SSL_OP_NO_TLSv1_3 = 536870912L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_OP_NO_TLSv1_3 536870912
* }
*/
public static long SSL_OP_NO_TLSv1_3() {
- return 536870912L;
+ return SSL_OP_NO_TLSv1_3;
}
+ private static final long SSL_OP_ALL = 2147485776L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define SSL_OP_ALL 2147485776
* }
*/
public static long SSL_OP_ALL() {
- return 2147485776L;
+ return SSL_OP_ALL;
}
+ private static final int ENGINE_METHOD_ALL = (int)65535L;
+
/**
- * {@snippet :
+ * {@snippet lang=c :
* #define ENGINE_METHOD_ALL 65535
* }
*/
public static int ENGINE_METHOD_ALL() {
- return (int)65535L;
+ return ENGINE_METHOD_ALL;
+ }
+ static MemorySegment findOrThrow(String symbol) {
+ return SYMBOL_LOOKUP.find(symbol)
+ .orElseThrow(() -> new UnsatisfiedLinkError("unresolved symbol: " + symbol));
+ }
+
+ static MemoryLayout[] inferVariadicLayouts(Object[] varargs) {
+ MemoryLayout[] result = new MemoryLayout[varargs.length];
+ for (int i = 0; i < varargs.length; i++) {
+ result[i] = variadicLayout(varargs[i].getClass());
+ }
+ return result;
+ }
+
+ static MethodHandle upcallHandle(Class<?> fi, String name, FunctionDescriptor fdesc) {
+ try {
+ return MethodHandles.lookup().findVirtual(fi, name, fdesc.toMethodType());
+ } catch (ReflectiveOperationException ex) {
+ throw new AssertionError(ex);
+ }
+ }
+
+ static MethodHandle downcallHandleVariadic(String name, FunctionDescriptor baseDesc, MemoryLayout[] variadicLayouts) {
+ FunctionDescriptor variadicDesc = baseDesc.appendArgumentLayouts(variadicLayouts);
+ Linker.Option fva = Linker.Option.firstVariadicArg(baseDesc.argumentLayouts().size());
+ return SYMBOL_LOOKUP.find(name)
+ .map(addr -> Linker.nativeLinker().downcallHandle(addr, variadicDesc, fva)
+ .asSpreader(Object[].class, variadicLayouts.length))
+ .orElse(null);
+ }
+
+ // Internals only below this point
+
+ private static MemoryLayout variadicLayout(Class<?> c) {
+ // apply default argument promotions per C spec
+ // note that all primitives are boxed, since they are passed through an Object[]
+ if (c == Boolean.class || c == Byte.class || c == Character.class || c == Short.class || c == Integer.class) {
+ return JAVA_INT;
+ } else if (c == Long.class) {
+ return JAVA_LONG;
+ } else if (c == Float.class || c == Double.class) {
+ return JAVA_DOUBLE;
+ } else if (MemorySegment.class.isAssignableFrom(c)) {
+ return ADDRESS;
+ }
+ throw new IllegalArgumentException("Invalid type for ABI: " + c.getTypeName());
}
}
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/openssl_h_Compatibility.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/openssl_h_Compatibility.java
index 841a581ee8..11692f086b 100644
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/openssl_h_Compatibility.java
+++ b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/openssl_h_Compatibility.java
@@ -24,18 +24,16 @@ import static java.lang.foreign.ValueLayout.*;
/**
* Methods used present in older OpenSSL versions but not in the current major version.
*/
-public class openssl_h_Compatibility {
+public class openssl_h_Compatibility {
// OpenSSL 1.1 FIPS_mode
- static final FunctionDescriptor FIPS_mode$FUNC = FunctionDescriptor
- .of(JAVA_INT);
- static final MethodHandle FIPS_mode$MH = RuntimeHelper
- .downcallHandle("FIPS_mode", FIPS_mode$FUNC);
- public static MethodHandle FIPS_mode$MH() {
- return RuntimeHelper.requireNonNull(FIPS_mode$MH, "FIPS_mode");
- }
public static int FIPS_mode() {
- var mh$ = RuntimeHelper.requireNonNull(FIPS_mode$MH, "FIPS_mode");
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(JAVA_INT);
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(openssl_h.findOrThrow("FIPS_mode"),
+ DESC);
+ }
+ var mh$ = Holder.MH;
try {
return (int) mh$.invokeExact();
} catch (Throwable ex$) {
@@ -44,16 +42,13 @@ public class openssl_h_Compatibility {
}
// OpenSSL 1.1 FIPS_mode_set
- static final FunctionDescriptor FIPS_mode_set$FUNC = FunctionDescriptor
- .of(JAVA_INT, JAVA_INT);
- static final MethodHandle FIPS_mode_set$MH = RuntimeHelper
- .downcallHandle("FIPS_mode_set", FIPS_mode_set$FUNC);
- public static MethodHandle FIPS_mode_set$MH() {
- return RuntimeHelper.requireNonNull(FIPS_mode_set$MH, "FIPS_mode_set");
- }
public static int FIPS_mode_set(int r) {
- var mh$ = RuntimeHelper.requireNonNull(FIPS_mode_set$MH,
- "FIPS_mode_set");
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(JAVA_INT, JAVA_INT);
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(openssl_h.findOrThrow("FIPS_mode_set"),
+ DESC);
+ }
+ var mh$ = Holder.MH;
try {
return (int) mh$.invokeExact(r);
} catch (Throwable ex$) {
@@ -62,16 +57,13 @@ public class openssl_h_Compatibility {
}
// OpenSSL 1.1 EVP_PKEY_base_id
- static final FunctionDescriptor EVP_PKEY_base_id$FUNC = FunctionDescriptor
- .of(JAVA_INT, RuntimeHelper.POINTER);
- static final MethodHandle EVP_PKEY_base_id$MH = RuntimeHelper
- .downcallHandle("EVP_PKEY_base_id", EVP_PKEY_base_id$FUNC);
- public static MethodHandle EVP_PKEY_base_id$MH() {
- return RuntimeHelper.requireNonNull(EVP_PKEY_base_id$MH,
- "EVP_PKEY_base_id");
- }
public static int EVP_PKEY_base_id(MemorySegment pkey) {
- var mh$ = EVP_PKEY_base_id$MH();
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(JAVA_INT, openssl_h.C_POINTER);
+ static final MethodHandle MH = Linker.nativeLinker()
+ .downcallHandle(openssl_h.findOrThrow("EVP_PKEY_base_id"), DESC);
+ }
+ var mh$ = Holder.MH;
try {
return (int) mh$.invokeExact(pkey);
} catch (Throwable ex$) {
@@ -80,15 +72,13 @@ public class openssl_h_Compatibility {
}
// OpenSSL 1.1 EVP_PKEY_bits
- static final FunctionDescriptor EVP_PKEY_bits$FUNC = FunctionDescriptor
- .of(JAVA_INT, RuntimeHelper.POINTER);
- static final MethodHandle EVP_PKEY_bits$MH = RuntimeHelper
- .downcallHandle("EVP_PKEY_bits", EVP_PKEY_bits$FUNC);
- public static MethodHandle EVP_PKEY_bits$MH() {
- return RuntimeHelper.requireNonNull(EVP_PKEY_bits$MH, "EVP_PKEY_bits");
- }
public static int EVP_PKEY_bits(MemorySegment pkey) {
- var mh$ = EVP_PKEY_bits$MH();
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(JAVA_INT, openssl_h.C_POINTER);
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(openssl_h.findOrThrow("EVP_PKEY_bits"),
+ DESC);
+ }
+ var mh$ = Holder.MH;
try {
return (int) mh$.invokeExact(pkey);
} catch (Throwable ex$) {
@@ -97,17 +87,13 @@ public class openssl_h_Compatibility {
}
// OpenSSL 1.1 SSL_get_peer_certificate
- static final FunctionDescriptor SSL_get_peer_certificate$FUNC = FunctionDescriptor
- .of(RuntimeHelper.POINTER, RuntimeHelper.POINTER);
- static final MethodHandle SSL_get_peer_certificate$MH = RuntimeHelper
- .downcallHandle("SSL_get_peer_certificate",
- SSL_get_peer_certificate$FUNC);
- public static MethodHandle SSL_get_peer_certificate$MH() {
- return RuntimeHelper.requireNonNull(SSL_get_peer_certificate$MH,
- "SSL_get_peer_certificate");
- }
public static MemorySegment SSL_get_peer_certificate(MemorySegment s) {
- var mh$ = SSL_get_peer_certificate$MH();
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(openssl_h.C_POINTER, openssl_h.C_POINTER);
+ static final MethodHandle MH = Linker.nativeLinker()
+ .downcallHandle(openssl_h.findOrThrow("SSL_get_peer_certificate"), DESC);
+ }
+ var mh$ = Holder.MH;
try {
return (java.lang.foreign.MemorySegment) mh$.invokeExact(s);
} catch (Throwable ex$) {
@@ -117,4 +103,3 @@ public class openssl_h_Compatibility {
}
-
diff --git a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java
index de8cf7e079..2f7c4f33ee 100644
--- a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java
+++ b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java
@@ -17,22 +17,30 @@
package org.apache.tomcat.util.openssl;
+import java.lang.foreign.FunctionDescriptor;
+import java.lang.foreign.Linker;
import java.lang.foreign.MemorySegment;
+import java.lang.foreign.ValueLayout;
+import java.lang.invoke.MethodHandle;
import static org.apache.tomcat.util.openssl.openssl_h.*;
/**
* Functional macros not handled by jextract.
*/
+@SuppressWarnings("javadoc")
public class openssl_h_Macros {
/**
* Set maximum protocol version on the given context.
- * # define SSL_CTX_set_max_proto_version(sslCtx, version) \
- * SSL_CTX_ctrl(sslCtx, SSL_CTRL_SET_MAX_PROTO_VERSION, version, NULL)
- * @param sslCtx the SSL context
+ * {@snippet lang = c : # define SSL_CTX_set_max_proto_version(sslCtx, version) \
+ * SSL_CTX_ctrl(sslCtx, SSL_CTRL_SET_MAX_PROTO_VERSION, version, NULL)
+ * }
+ *
+ * @param sslCtx the SSL context
* @param version the maximum version
+ *
* @return > 0 if successful
*/
public static long SSL_CTX_set_max_proto_version(MemorySegment sslCtx, long version) {
@@ -42,10 +50,13 @@ public class openssl_h_Macros {
/**
* Set minimum protocol version on the given context.
- * # define SSL_CTX_set_min_proto_version(sslCtx, version) \
- * SSL_CTX_ctrl(sslCtx, SSL_CTRL_SET_MIN_PROTO_VERSION, version, NULL)
- * @param sslCtx the SSL context
+ * {@snippet lang = c : # define SSL_CTX_set_min_proto_version(sslCtx, version) \
+ * SSL_CTX_ctrl(sslCtx, SSL_CTRL_SET_MIN_PROTO_VERSION, version, NULL)
+ * }
+ *
+ * @param sslCtx the SSL context
* @param version the maximum version
+ *
* @return > 0 if successful
*/
public static long SSL_CTX_set_min_proto_version(MemorySegment sslCtx, long version) {
@@ -55,10 +66,12 @@ public class openssl_h_Macros {
/**
* Get the session cache size.
- * # define SSL_CTX_sess_get_cache_size(sslCtx) \
- * SSL_CTX_ctrl(sslCtx, SSL_CTRL_GET_SESS_CACHE_SIZE, 0, NULL)
+ * {@snippet lang = c : # define SSL_CTX_sess_get_cache_size(sslCtx) \
+ * SSL_CTX_ctrl(sslCtx, SSL_CTRL_GET_SESS_CACHE_SIZE, 0, NULL)
+ * }
+ *
* @param sslCtx the SSL context
- * @param cacheSize the session cache size
+ *
* @return > 0 if successful
*/
public static long SSL_CTX_sess_get_cache_size(MemorySegment sslCtx) {
@@ -68,10 +81,13 @@ public class openssl_h_Macros {
/**
* Set the session cache size.
- * # define SSL_CTX_sess_set_cache_size(sslCtx, t) \
- * SSL_CTX_ctrl(sslCtx, SSL_CTRL_SET_SESS_CACHE_SIZE, t, NULL)
- * @param sslCtx the SSL context
+ * {@snippet lang = c : # define SSL_CTX_sess_set_cache_size(sslCtx, t) \
+ * SSL_CTX_ctrl(sslCtx, SSL_CTRL_SET_SESS_CACHE_SIZE, t, NULL)
+ * }
+ *
+ * @param sslCtx the SSL context
* @param cacheSize the session cache size
+ *
* @return > 0 if successful
*/
public static long SSL_CTX_sess_set_cache_size(MemorySegment sslCtx, long cacheSize) {
@@ -81,9 +97,12 @@ public class openssl_h_Macros {
/**
* Get the session cache mode.
- * # define SSL_CTX_get_session_cache_mode(sslCtx) \
- * SSL_CTX_ctrl(sslCtx, SSL_CTRL_GET_SESS_CACHE_MODE, 0, NULL)
+ * {@snippet lang = c : # define SSL_CTX_get_session_cache_mode(sslCtx) \
+ * SSL_CTX_ctrl(sslCtx, SSL_CTRL_GET_SESS_CACHE_MODE, 0, NULL)
+ * }
+ *
* @param sslCtx the SSL context
+ *
* @return > 0 if successful
*/
public static long SSL_CTX_get_session_cache_mode(MemorySegment sslCtx) {
@@ -93,10 +112,13 @@ public class openssl_h_Macros {
/**
* Set the session cache mode.
- * # define SSL_CTX_set_session_cache_mode(sslCtx, m) \
- * SSL_CTX_ctrl(sslCtx, SSL_CTRL_SET_SESS_CACHE_MODE, m, NULL)
- * @param sslCtx the SSL context
+ * {@snippet lang = c : # define SSL_CTX_set_session_cache_mode(sslCtx, m) \
+ * SSL_CTX_ctrl(sslCtx, SSL_CTRL_SET_SESS_CACHE_MODE, m, NULL)
+ * }
+ *
+ * @param sslCtx the SSL context
* @param cacheMode the cache mode, SSL_SESS_CACHE_OFF to disable
+ *
* @return > 0 if successful
*/
public static long SSL_CTX_set_session_cache_mode(MemorySegment sslCtx, long cacheMode) {
@@ -106,10 +128,13 @@ public class openssl_h_Macros {
/**
* Set the certificate.
- * # define SSL_CTX_add0_chain_cert(sslCtx,x509) \
- * SSL_CTX_ctrl(sslCtx, SSL_CTRL_CHAIN_CERT, 0, (char *)(x509))
+ * {@snippet lang = c : # define SSL_CTX_add0_chain_cert(sslCtx,x509) \
+ * SSL_CTX_ctrl(sslCtx, SSL_CTRL_CHAIN_CERT, 0, (char *)(x509))
+ * }
+ *
* @param sslCtx the SSL context
- * @param x509 the certificate
+ * @param x509 the certificate
+ *
* @return > 0 if successful
*/
public static long SSL_CTX_add0_chain_cert(MemorySegment sslCtx, MemorySegment x509) {
@@ -119,11 +144,14 @@ public class openssl_h_Macros {
/**
* Set ticket keys.
- * # define SSL_CTX_set_tlsext_ticket_keys(ctx, keys, keylen) \
- * SSL_CTX_ctrl((ctx),SSL_CTRL_SET_TLSEXT_TICKET_KEYS, (keylen), (keys))
- * @param sslCtx the SSL context
- * @param keys the keys
+ * {@snippet lang = c : # define SSL_CTX_set_tlsext_ticket_keys(ctx, keys, keylen) \
+ * SSL_CTX_ctrl((ctx),SSL_CTRL_SET_TLSEXT_TICKET_KEYS, (keylen), (keys))
+ * }
+ *
+ * @param sslCtx the SSL context
+ * @param keys the keys
* @param keyLength the length
+ *
* @return > 0 if successful
*/
public static long SSL_CTX_set_tlsext_ticket_keys(MemorySegment sslCtx, MemorySegment keys, long keyLength) {
@@ -133,10 +161,13 @@ public class openssl_h_Macros {
/**
* Read the specified file.
- * # define BIO_read_filename(b,name) \
- * (int)BIO_ctrl(b,BIO_C_SET_FILENAME, BIO_CLOSE|BIO_FP_READ,(char *)(name))
- * @param bio The BIO to read into
+ * {@snippet lang = c : # define BIO_read_filename(b,name) \
+ * (int)BIO_ctrl(b,BIO_C_SET_FILENAME,BIO_CLOSE|BIO_FP_READ,(char *)(name))
+ * }
+ *
+ * @param bio The BIO to read into
* @param name the file name
+ *
* @return > 0 if successful
*/
public static long BIO_read_filename(MemorySegment bio, MemorySegment name) {
@@ -146,10 +177,13 @@ public class openssl_h_Macros {
/**
* Set tmp dh.
- * # define SSL_CTX_set_tmp_dh(sslCtx,dh) \
- * SSL_CTX_ctrl(sslCtx,SSL_CTRL_SET_TMP_DH,0,(char *)(dh))
+ * {@snippet lang = c : # define SSL_CTX_set_tmp_dh(sslCtx,dh) \
+ * SSL_CTX_ctrl(sslCtx,SSL_CTRL_SET_TMP_DH,0,(char *)(dh))
+ * }
+ *
* @param sslCtx the SSL context
- * @param dh the dh
+ * @param dh the dh
+ *
* @return > 0 if successful
*/
public static long SSL_CTX_set_tmp_dh(MemorySegment sslCtx, MemorySegment dh) {
@@ -159,10 +193,13 @@ public class openssl_h_Macros {
/**
* Set tmp ecdh.
- * # define SSL_CTX_set_tmp_ecdh(sslCtx,ecdh) \
- * SSL_CTX_ctrl(sslCtx,SSL_CTRL_SET_TMP_ECDH,0,(char *)(ecdh))
+ * {@snippet lang = c : # define SSL_CTX_set_tmp_ecdh(sslCtx,ecdh) \
+ * SSL_CTX_ctrl(sslCtx,SSL_CTRL_SET_TMP_ECDH,0,(char *)(ecdh))
+ * }
+ *
* @param sslCtx the SSL context
- * @param ecdh the ecdh
+ * @param ecdh the ecdh
+ *
* @return > 0 if successful
*/
public static long SSL_CTX_set_tmp_ecdh(MemorySegment sslCtx, MemorySegment ecdh) {
@@ -172,8 +209,10 @@ public class openssl_h_Macros {
/**
* Free memory.
- * # define OPENSSL_free(addr) \
- * CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
+ * {@snippet lang = c : # define OPENSSL_free(addr) CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
+ * }
+ *
+ * @param segment The address to free
*/
public static void OPENSSL_free(MemorySegment segment) {
CRYPTO_free(segment, MemorySegment.NULL, 0);
@@ -182,8 +221,12 @@ public class openssl_h_Macros {
/**
* Reset BIO position.
- * # define BIO_reset(b) \
- * (int)BIO_ctrl(b,BIO_CTRL_RESET,0,NULL)
+ * {@snippet lang = c : # define BIO_reset(b) (int)BIO_ctrl(b,BIO_CTRL_RESET,0,NULL)
+ * }
+ *
+ * @param bio The BIO to reset
+ *
+ * @return > 0 if successful
*/
public static long BIO_reset(MemorySegment bio) {
return BIO_ctrl(bio, BIO_CTRL_RESET(), 0, MemorySegment.NULL);
@@ -191,13 +234,16 @@ public class openssl_h_Macros {
/**
- * Set NIDs of groups in preference order.
- * # define SSL_CTX_set1_curves SSL_CTX_set1_groups
- * # define SSL_CTX_set1_groups(ctx, glist, glistlen) \
- * SSL_CTX_ctrl(ctx,SSL_CTRL_SET_GROUPS,glistlen,(int *)(glist))
- * @param sslCtx the SSL context
+ * Set NIDs of groups in preference order.
+ * {@snippet lang = c : # define SSL_CTX_set1_curves SSL_CTX_set1_groups
+ * # define SSL_CTX_set1_groups(ctx, glist, glistlen) \
+ * SSL_CTX_ctrl(ctx,SSL_CTRL_SET_GROUPS,glistlen,(int *)(glist))
+ * }
+ *
+ * @param sslCtx the SSL context
* @param groupsList the groups list
* @param listLength the list length
+ *
* @return > 0 if successful
*/
public static long SSL_CTX_set1_groups(MemorySegment sslCtx, MemorySegment groupsList, int listLength) {
@@ -207,11 +253,14 @@ public class openssl_h_Macros {
/**
* Pass a path from which certificates are loaded into the store.
- * # define X509_LOOKUP_add_dir(x,name,type) \
- * X509_LOOKUP_ctrl((x),X509_L_ADD_DIR,(name),(long)(type),NULL)
+ * {@snippet lang = c : # define X509_LOOKUP_add_dir(x,name,type) \
+ * X509_LOOKUP_ctrl((x),X509_L_ADD_DIR,(name),(long)(type),NULL)
+ * }
+ *
* @param x509Lookup the X509 lookup
- * @param name the path name
- * @param type the type used
+ * @param name the path name
+ * @param type the type used
+ *
* @return > 0 if successful
*/
public static long X509_LOOKUP_add_dir(MemorySegment x509Lookup, MemorySegment name, long type) {
@@ -220,17 +269,307 @@ public class openssl_h_Macros {
/**
* Pass a file which will be loaded into the store.
- * # define X509_LOOKUP_load_file(x,name,type) \
- * X509_LOOKUP_ctrl((x),X509_L_FILE_LOAD,(name),(long)(type),NULL)
- * @param x509Lookup
- * @param name
- * @param type
- * @return
+ * {@snippet lang = c : # define X509_LOOKUP_load_file(x,name,type) \
+ * X509_LOOKUP_ctrl((x),X509_L_FILE_LOAD,(name),(long)(type),NULL)
+ * }
+ *
+ * @param x509Lookup the X509 lookup
+ * @param name the path name
+ * @param type the type used
+ *
+ * @return > 0 if successful
*/
public static long X509_LOOKUP_load_file(MemorySegment x509Lookup, MemorySegment name, long type) {
return X509_LOOKUP_ctrl(x509Lookup, X509_L_FILE_LOAD(), name, X509_FILETYPE_PEM(), MemorySegment.NULL);
}
-}
+ // Other symbols that have questionable visibility from jextract
+
+ /**
+ * {@snippet lang = c : * void X509_free(X509* a);
+ * }
+ */
+ public static void X509_free(MemorySegment a) {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(openssl_h.C_POINTER);
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(openssl_h.findOrThrow("X509_free"),
+ DESC);
+ }
+ var mh$ = Holder.MH;
+ try {
+ mh$.invokeExact(a);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ /**
+ * {@snippet lang = c : * X509* d2i_X509(X509** a, unsigned char** in, long len);
+ * }
+ */
+ public static MemorySegment d2i_X509(MemorySegment a, MemorySegment in, long len) {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(openssl_h.C_POINTER, openssl_h.C_POINTER,
+ openssl_h.C_POINTER, ValueLayout.JAVA_LONG);
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(openssl_h.findOrThrow("d2i_X509"),
+ DESC);
+ }
+ var mh$ = Holder.MH;
+ try {
+ return (MemorySegment) mh$.invokeExact(a, in, len);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ /**
+ * {@snippet lang = c : * int i2d_X509(const X509* a, unsigned char** out);
+ * }
+ */
+ public static int i2d_X509(MemorySegment a, MemorySegment out) {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(ValueLayout.JAVA_INT, openssl_h.C_POINTER,
+ openssl_h.C_POINTER);
+ static final MethodHandle MH = Linker.nativeLinker().downcallHandle(openssl_h.findOrThrow("i2d_X509"),
+ DESC);
+ }
+ var mh$ = Holder.MH;
+ try {
+ return (int) mh$.invokeExact(a, out);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ /**
+ * {@snippet lang = c : * X509* PEM_read_bio_X509_AUX(BIO* out, X509** x, pem_password_cb* cb, void* u);
+ * }
+ */
+ public static MemorySegment PEM_read_bio_X509_AUX(MemorySegment out, MemorySegment x, MemorySegment cb,
+ MemorySegment u) {
+ class Holder {
+ static final FunctionDescriptor DESC = FunctionDescriptor.of(openssl_h.C_POINTER, openssl_h.C_POINTER,
+ openssl_h.C_POINTER, openssl_h.C_POINTER, openssl_h.C_POINTER);
... 223 lines suppressed ...
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org