Re: Tine to tag

2023-12-05 Thread Rémy Maucherat
On Tue, Dec 5, 2023 at 8:02 PM Mark Thomas  wrote:
>
> Hi all,
>
> There are a few tasks to complete but we are close to being in a
> position to tag the December release.
>
> The remaining tasks are:
>
> - check dependencies for updates
> - sync with POEditor
> - fix the new test that fails on NIO2 + Windows
> - maybe some further improvements to the unit tests
>
> Thoughts on tagging once the above tasks are complete?

+1

Rémy

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

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



Tine to tag

2023-12-05 Thread Mark Thomas

Hi all,

There are a few tasks to complete but we are close to being in a 
position to tag the December release.


The remaining tasks are:

- check dependencies for updates
- sync with POEditor
- fix the new test that fails on NIO2 + Windows
- maybe some further improvements to the unit tests

Thoughts on tagging once the above tasks are complete?

Mark


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



[Bug 68295] New: Connection has already been closed - Tomcat connection pool

2023-12-05 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68295

Bug ID: 68295
   Summary: Connection has already been closed - Tomcat connection
pool
   Product: Tomcat 9
   Version: unspecified
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Documentation
  Assignee: dev@tomcat.apache.org
  Reporter: angadpaul.si...@rbc.com
  Target Milestone: -

Created attachment 39435
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=39435=edit
Logs from batch job

As per the documentation on
https://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html. We have implemented
Tomcat Connection pool in our project. It is a Java batch job and we are using
below properties.

maxTotal="100"
maxIdle="20" 

removeAbandoned="true"
removeAbandonedTimeout="1800"

Our batch job abruptly ends with below logs:
exitDescription=org.springframework.transaction.TransactionSystemException:
Could not roll back JPA transaction; nested exception is
org.hibernate.TransactionException: Unable to rollback against JDBC
Connection\n\tat org.springframework.orm.jpa.JpaTransactionManager.doRollback

I need to understand what should be the combination of these params?
removeAbandoned as per documentation is for longest running query but this
fails even the queries run less than 5 mins. 
Is there a different param like maxAge we need to use?
Also attcahed complete logs too.
Pls help as this is impacting our batch jobs.

Thanks
Angadpaul

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: (tomcat) 02/02: Improve performance of HTTP/2 tests

2023-12-05 Thread Mark Thomas

On 05/12/2023 16:14, Rémy Maucherat wrote:

On Tue, Dec 5, 2023 at 1:17 PM  wrote:


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

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

commit a8bffcbf55624ba14819dfc636f2e63dd1a8289d
Author: Mark Thomas 
AuthorDate: Tue Dec 5 12:16:18 2023 +

 Improve performance of HTTP/2 tests


On the Apache CI, the runs went from 43mins down to 35mins, so that's nice.


That is more than I was expecting.

Some of the tests still seem to be taking longer than they should. I'm 
looking at those and will hopefully have some further improvements.


Mark

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



Re: (tomcat) 02/02: Improve performance of HTTP/2 tests

2023-12-05 Thread Rémy Maucherat
On Tue, Dec 5, 2023 at 1:17 PM  wrote:
>
> This is an automated email from the ASF dual-hosted git repository.
>
> markt pushed a commit to branch main
> in repository https://gitbox.apache.org/repos/asf/tomcat.git
>
> commit a8bffcbf55624ba14819dfc636f2e63dd1a8289d
> Author: Mark Thomas 
> AuthorDate: Tue Dec 5 12:16:18 2023 +
>
> Improve performance of HTTP/2 tests

On the Apache CI, the runs went from 43mins down to 35mins, so that's nice.

Rémy

> ---
>  test/org/apache/coyote/http2/Http2TestBase.java| 3 ++-
>  test/org/apache/coyote/http2/TestHttp2Section_4_2.java | 4 
>  2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/test/org/apache/coyote/http2/Http2TestBase.java 
> b/test/org/apache/coyote/http2/Http2TestBase.java
> index c95c62e8cb..953aa9a759 100644
> --- a/test/org/apache/coyote/http2/Http2TestBase.java
> +++ b/test/org/apache/coyote/http2/Http2TestBase.java
> @@ -16,6 +16,7 @@
>   */
>  package org.apache.coyote.http2;
>
> +import java.io.BufferedOutputStream;
>  import java.io.ByteArrayInputStream;
>  import java.io.ByteArrayOutputStream;
>  import java.io.IOException;
> @@ -673,7 +674,7 @@ public abstract class Http2TestBase extends 
> TomcatBaseTest {
>  s = socketFactory.createSocket("localhost", getPort());
>  s.setSoTimeout(3);
>
> -os = s.getOutputStream();
> +os = new BufferedOutputStream(s.getOutputStream());
>  InputStream is = s.getInputStream();
>
>  input = new TestInput(is);
> diff --git a/test/org/apache/coyote/http2/TestHttp2Section_4_2.java 
> b/test/org/apache/coyote/http2/TestHttp2Section_4_2.java
> index 3c158c724d..d73a2495a7 100644
> --- a/test/org/apache/coyote/http2/TestHttp2Section_4_2.java
> +++ b/test/org/apache/coyote/http2/TestHttp2Section_4_2.java
> @@ -51,6 +51,7 @@ public class TestHttp2Section_4_2 extends Http2TestBase {
>  }
>
>  os.write(settings);
> +os.flush();
>
>  handleGoAwayResponse(1, Http2Error.FRAME_SIZE_ERROR);
>  }
> @@ -73,6 +74,7 @@ public class TestHttp2Section_4_2 extends Http2TestBase {
>  // Empty payload
>
>  os.write(ping);
> +os.flush();
>
>  handleGoAwayResponse(1, Http2Error.FRAME_SIZE_ERROR);
>  }
> @@ -95,6 +97,7 @@ public class TestHttp2Section_4_2 extends Http2TestBase {
>  // Empty payload
>
>  os.write(ping);
> +os.flush();
>
>  handleGoAwayResponse(1, Http2Error.FRAME_SIZE_ERROR);
>  }
> @@ -118,6 +121,7 @@ public class TestHttp2Section_4_2 extends Http2TestBase {
>  // Empty payload
>
>  os.write(priority);
> +os.flush();
>
>  // Read Stream reset frame
>  parser.readFrame();
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>

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



Buildbot success in on tomcat-11.0.x

2023-12-05 Thread buildbot
Build status: Build succeeded!
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/112/builds/784
Blamelist: Mark Thomas , remm 
Build Text: build successful
Status Detected: restored build
Build Source Stamp: [branch main] a96d03b81be9f4ba196279eac75dc5bbaeb93eef


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  shell_6: 0

  compile: 1

  shell_7: 0

  shell_8: 0

  shell_9: 0

  shell_10: 0

  Rsync docs to nightlies.apache.org: 0

  shell_11: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 1

  shell_12: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


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



(tomcat) branch main updated: Cleanups

2023-12-05 Thread remm
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new a96d03b81b Cleanups
a96d03b81b is described below

commit a96d03b81be9f4ba196279eac75dc5bbaeb93eef
Author: remm 
AuthorDate: Tue Dec 5 14:22:11 2023 +0100

Cleanups
---
 .../tomcat/util/openssl/openssl_h_Macros.java  | 92 +++---
 1 file changed, 63 insertions(+), 29 deletions(-)

diff --git a/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java 
b/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java
index 627bc004be..2f7c4f33ee 100644
--- a/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java
+++ b/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java
@@ -33,8 +33,10 @@ 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)
+ * Set maximum protocol version on the given 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
@@ -47,8 +49,10 @@ 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)
+ * Set minimum protocol version on the given 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
@@ -61,8 +65,10 @@ 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)
+ * Get the session cache size.
+ * {@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
  *
@@ -74,8 +80,10 @@ 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)
+ * Set the session cache size.
+ * {@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 sslCtxthe SSL context
  * @param cacheSize the session cache size
@@ -88,8 +96,10 @@ 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)
+ * Get the session cache mode.
+ * {@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
  *
@@ -101,8 +111,10 @@ 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)
+ * Set the session cache mode.
+ * {@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 sslCtxthe SSL context
  * @param cacheMode the cache mode, SSL_SESS_CACHE_OFF to disable
@@ -115,8 +127,10 @@ 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))
+ * Set the certificate.
+ * {@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
@@ -129,8 +143,10 @@ 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))
+ * Set ticket 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 sslCtxthe SSL context
  * @param keys  

Buildbot failure in on tomcat-11.0.x

2023-12-05 Thread buildbot
Build status: BUILD FAILED: failed Snapshot deployed to ASF Maven snapshot 
repository (failure)
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/112/builds/783
Blamelist: Mark Thomas 
Build Text: failed Snapshot deployed to ASF Maven snapshot repository (failure)
Status Detected: new failure
Build Source Stamp: [branch main] a8bffcbf55624ba14819dfc636f2e63dd1a8289d


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  shell_6: 0

  compile: 1

  shell_7: 0

  shell_8: 0

  shell_9: 2


-- ASF Buildbot


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



(tomcat) 01/02: Fix IDE warning

2023-12-05 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 46ae0b18b8a5e7a0e206d7dbf11cd1a978a64dbc
Author: Mark Thomas 
AuthorDate: Mon Dec 4 22:01:26 2023 +

Fix IDE warning
---
 test/org/apache/catalina/core/TestStandardHostValve.java | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/test/org/apache/catalina/core/TestStandardHostValve.java 
b/test/org/apache/catalina/core/TestStandardHostValve.java
index 6433d0e1e1..2f0799c7a8 100644
--- a/test/org/apache/catalina/core/TestStandardHostValve.java
+++ b/test/org/apache/catalina/core/TestStandardHostValve.java
@@ -112,9 +112,6 @@ public class TestStandardHostValve extends TomcatBaseTest {
 
 @Test(expected=IllegalArgumentException.class)
 public void testInvalidErrorPage() throws Exception {
-// Set up a container
-Tomcat tomcat = getTomcatInstance();
-
 // No file system docBase required
 Context ctx = getProgrammaticRootContext();
 


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



(tomcat) 02/02: Improve performance of HTTP/2 tests

2023-12-05 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit a8bffcbf55624ba14819dfc636f2e63dd1a8289d
Author: Mark Thomas 
AuthorDate: Tue Dec 5 12:16:18 2023 +

Improve performance of HTTP/2 tests
---
 test/org/apache/coyote/http2/Http2TestBase.java| 3 ++-
 test/org/apache/coyote/http2/TestHttp2Section_4_2.java | 4 
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/coyote/http2/Http2TestBase.java 
b/test/org/apache/coyote/http2/Http2TestBase.java
index c95c62e8cb..953aa9a759 100644
--- a/test/org/apache/coyote/http2/Http2TestBase.java
+++ b/test/org/apache/coyote/http2/Http2TestBase.java
@@ -16,6 +16,7 @@
  */
 package org.apache.coyote.http2;
 
+import java.io.BufferedOutputStream;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -673,7 +674,7 @@ public abstract class Http2TestBase extends TomcatBaseTest {
 s = socketFactory.createSocket("localhost", getPort());
 s.setSoTimeout(3);
 
-os = s.getOutputStream();
+os = new BufferedOutputStream(s.getOutputStream());
 InputStream is = s.getInputStream();
 
 input = new TestInput(is);
diff --git a/test/org/apache/coyote/http2/TestHttp2Section_4_2.java 
b/test/org/apache/coyote/http2/TestHttp2Section_4_2.java
index 3c158c724d..d73a2495a7 100644
--- a/test/org/apache/coyote/http2/TestHttp2Section_4_2.java
+++ b/test/org/apache/coyote/http2/TestHttp2Section_4_2.java
@@ -51,6 +51,7 @@ public class TestHttp2Section_4_2 extends Http2TestBase {
 }
 
 os.write(settings);
+os.flush();
 
 handleGoAwayResponse(1, Http2Error.FRAME_SIZE_ERROR);
 }
@@ -73,6 +74,7 @@ public class TestHttp2Section_4_2 extends Http2TestBase {
 // Empty payload
 
 os.write(ping);
+os.flush();
 
 handleGoAwayResponse(1, Http2Error.FRAME_SIZE_ERROR);
 }
@@ -95,6 +97,7 @@ public class TestHttp2Section_4_2 extends Http2TestBase {
 // Empty payload
 
 os.write(ping);
+os.flush();
 
 handleGoAwayResponse(1, Http2Error.FRAME_SIZE_ERROR);
 }
@@ -118,6 +121,7 @@ public class TestHttp2Section_4_2 extends Http2TestBase {
 // Empty payload
 
 os.write(priority);
+os.flush();
 
 // Read Stream reset frame
 parser.readFrame();


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



(tomcat) branch main updated (729962816f -> a8bffcbf55)

2023-12-05 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from 729962816f Cleanup
 new 46ae0b18b8 Fix IDE warning
 new a8bffcbf55 Improve performance of HTTP/2 tests

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 test/org/apache/catalina/core/TestStandardHostValve.java | 3 ---
 test/org/apache/coyote/http2/Http2TestBase.java  | 3 ++-
 test/org/apache/coyote/http2/TestHttp2Section_4_2.java   | 4 
 3 files changed, 6 insertions(+), 4 deletions(-)


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



(tomcat) branch main updated: Cleanup

2023-12-05 Thread remm
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 729962816f Cleanup
729962816f is described below

commit 729962816fe2d36d351cf1223fdc45bbcdae199b
Author: remm 
AuthorDate: Tue Dec 5 12:10:17 2023 +0100

Cleanup

I don't see why the method handle needs a separate method, maybe it is
simply a leftover at this point. Try to remove it for the code that is
not generated by jextract.
---
 .../util/openssl/openssl_h_Compatibility.java  |  88 +++---
 .../tomcat/util/openssl/openssl_h_Macros.java  | 191 +++--
 2 files changed, 90 insertions(+), 189 deletions(-)

diff --git a/java/org/apache/tomcat/util/openssl/openssl_h_Compatibility.java 
b/java/org/apache/tomcat/util/openssl/openssl_h_Compatibility.java
index 829e8e059f..11692f086b 100644
--- a/java/org/apache/tomcat/util/openssl/openssl_h_Compatibility.java
+++ b/java/org/apache/tomcat/util/openssl/openssl_h_Compatibility.java
@@ -27,67 +27,43 @@ import static java.lang.foreign.ValueLayout.*;
 public class openssl_h_Compatibility {
 
 // OpenSSL 1.1 FIPS_mode
-public static MethodHandle FIPS_mode$MH() {
+public static int FIPS_mode() {
 class Holder {
-static final FunctionDescriptor DESC = FunctionDescriptor.of(
-JAVA_INT
-);
-
-static final MethodHandle MH = 
Linker.nativeLinker().downcallHandle(
-openssl_h.findOrThrow("FIPS_mode"),
+static final FunctionDescriptor DESC = 
FunctionDescriptor.of(JAVA_INT);
+static final MethodHandle MH = 
Linker.nativeLinker().downcallHandle(openssl_h.findOrThrow("FIPS_mode"),
 DESC);
 }
-return Holder.MH;
-}
-
-public static int FIPS_mode() {
-var mh$ = FIPS_mode$MH();
+var mh$ = Holder.MH;
 try {
 return (int) mh$.invokeExact();
 } catch (Throwable ex$) {
-   throw new AssertionError("should not reach here", ex$);
+throw new AssertionError("should not reach here", ex$);
 }
 }
 
 // OpenSSL 1.1 FIPS_mode_set
-public static MethodHandle FIPS_mode_set$MH() {
+public static int FIPS_mode_set(int r) {
 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"),
+static final FunctionDescriptor DESC = 
FunctionDescriptor.of(JAVA_INT, JAVA_INT);
+static final MethodHandle MH = 
Linker.nativeLinker().downcallHandle(openssl_h.findOrThrow("FIPS_mode_set"),
 DESC);
 }
-return Holder.MH;
-}
-
-public static int FIPS_mode_set(int r) {
-var mh$ = FIPS_mode_set$MH();
+var mh$ = Holder.MH;
 try {
 return (int) mh$.invokeExact(r);
 } catch (Throwable ex$) {
-   throw new AssertionError("should not reach here", ex$);
+throw new AssertionError("should not reach here", ex$);
 }
 }
 
 // OpenSSL 1.1 EVP_PKEY_base_id
-public static MethodHandle EVP_PKEY_base_id$MH() {
+public static int EVP_PKEY_base_id(MemorySegment pkey) {
 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);
+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);
 }
-return Holder.MH;
-}
-
-public static int EVP_PKEY_base_id(MemorySegment pkey) {
-var mh$ = EVP_PKEY_base_id$MH();
+var mh$ = Holder.MH;
 try {
 return (int) mh$.invokeExact(pkey);
 } catch (Throwable ex$) {
@@ -96,21 +72,13 @@ public class openssl_h_Compatibility {
 }
 
 // OpenSSL 1.1 EVP_PKEY_bits
-public static MethodHandle EVP_PKEY_bits$MH() {
+public static int EVP_PKEY_bits(MemorySegment pkey) {
 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"),
+static final FunctionDescriptor DESC =