3
3
## Building
4
4
5
5
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.
12
9
13
10
This step is only useful to be able to use additional native APIs from OpenSSL
14
11
or stdlib.
15
12
16
13
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 `
18
15
accordingly to set the appropriate path.
19
16
20
17
```
21
- export JEXTRACT_HOME=<pathto>/jextract/build/jextract
22
18
$JEXTRACT_HOME/bin/jextract @openssl-tomcat.conf openssl.h
23
19
```
24
20
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.
29
25
The ` openssl-tomcat.conf ` will generate a trimmed down OpenSSL API. When
30
26
developing new features, the full API can be generated instead using:
31
27
```
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
33
29
```
34
30
35
31
The ` openssl.conf ` file lists all the API calls and constants that can be
0 commit comments