Skip to content

Commit c25f511

Browse files
committed
Update jextract instructions
The jextract binary for Java 22 now seems very appropriate.
1 parent 489dca4 commit c25f511

File tree

3 files changed

+6
-21
lines changed

3 files changed

+6
-21
lines changed

res/openssl/README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,18 @@
33
## Building
44

55
The OpenSSL API support classes can be built using jextract from Java 22+.
6-
7-
jextract is now available in its own standalone repository. Clone
8-
`https://github.com/openjdk/jextract` in some location and
9-
checkout the branch that supports Java 22. Please refer to the
10-
instructions from the repository for building. It should be the
11-
`panama` branch.
6+
jextract can be downloaded from `https://jdk.java.net/jextract/`. Extract the
7+
download and set the path as the `JEXTRACT_HOME` environment variable for
8+
ease of use.
129

1310
This step is only useful to be able to use additional native APIs from OpenSSL
1411
or stdlib.
1512

1613
Find include paths using `gcc -xc -E -v -`, on Fedora it is
17-
`/usr/lib/gcc/x86_64-redhat-linux/12/include`. Edit `openssl-tomcat.conf`
14+
`/usr/lib/gcc/x86_64-redhat-linux/14/include`. Edit `openssl-tomcat.conf`
1815
accordingly to set the appropriate path.
1916

2017
```
21-
export JEXTRACT_HOME=<pathto>/jextract/build/jextract
2218
$JEXTRACT_HOME/bin/jextract @openssl-tomcat.conf openssl.h
2319
```
2420
Note: The build path for the JDK will be different on other platforms.
@@ -29,7 +25,7 @@ API compatible, the generated code will still work.
2925
The `openssl-tomcat.conf` will generate a trimmed down OpenSSL API. When
3026
developing new features, the full API can be generated instead using:
3127
```
32-
$JEXTRACT_HOME/bin/jextract --source -t org.apache.tomcat.util.openssl -lssl -I /usr/lib/gcc/x86_64-redhat-linux/12/include openssl.h --output src/main/java
28+
$JEXTRACT_HOME/bin/jextract --source -t org.apache.tomcat.util.openssl -lssl -I /usr/lib/gcc/x86_64-redhat-linux/14/include openssl.h --output src/main/java
3329
```
3430

3531
The `openssl.conf` file lists all the API calls and constants that can be

res/openssl/openssl-tomcat.conf

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
-t org.apache.tomcat.util.openssl
1717
-lssl
1818
# Configure include path
19-
-I /usr/lib/gcc/x86_64-redhat-linux/12/include
19+
-I /usr/lib/gcc/x86_64-redhat-linux/14/include
2020
--output ../../java
2121

2222
#### Extracted from: /usr/include/openssl/asn1.h
@@ -76,16 +76,6 @@
7676
--include-function EC_KEY_free # deprecated header: /usr/include/openssl/ec.h
7777
--include-function EC_KEY_new_by_curve_name # deprecated header: /usr/include/openssl/ec.h
7878

79-
#### Extracted from: /usr/include/openssl/engine.h
80-
81-
--include-function ENGINE_by_id # deprecated header: /usr/include/openssl/engine.h
82-
--include-function ENGINE_ctrl_cmd_string # deprecated header: /usr/include/openssl/engine.h
83-
--include-function ENGINE_free # deprecated header: /usr/include/openssl/engine.h
84-
--include-function ENGINE_load_private_key # deprecated header: /usr/include/openssl/engine.h
85-
--include-function ENGINE_register_all_complete # deprecated header: /usr/include/openssl/engine.h
86-
--include-function ENGINE_set_default # deprecated header: /usr/include/openssl/engine.h
87-
--include-constant ENGINE_METHOD_ALL # deprecated header: /usr/include/openssl/engine.h
88-
8979
#### Extracted from: /usr/include/openssl/err.h
9080

9181
--include-function ERR_clear_error # header: /usr/include/openssl/err.h

res/openssl/openssl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,5 @@
2626
#include <openssl/x509v3.h>
2727
#include <openssl/dh.h>
2828
#include <openssl/bn.h>
29-
#include <openssl/engine.h>
3029
#include <openssl/ocsp.h>
3130
#include <openssl/provider.h>

0 commit comments

Comments
 (0)