-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8969633
commit eea501f
Showing
12 changed files
with
1,722 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...enforcer.commons/src/main/java/org/wso2/apk/enforcer/commons/svm/BouncyCastleFeature.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.wso2.apk.enforcer.commons.svm; | ||
|
||
import org.bouncycastle.jce.provider.BouncyCastleProvider; | ||
import org.bouncycastle.jsse.provider.BouncyCastleJsseProvider; | ||
import org.graalvm.nativeimage.hosted.Feature; | ||
import org.graalvm.nativeimage.hosted.RuntimeClassInitialization; | ||
|
||
import java.security.Security; | ||
|
||
/** | ||
* This is a class used in GraalVM to register BC as the security provider at runtime. | ||
*/ | ||
public class BouncyCastleFeature implements Feature { | ||
|
||
@Override | ||
public void afterRegistration(AfterRegistrationAccess access) { | ||
RuntimeClassInitialization.initializeAtBuildTime("org.bouncycastle"); | ||
Security.addProvider(new BouncyCastleProvider()); | ||
Security.addProvider(new BouncyCastleJsseProvider()); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
100 changes: 100 additions & 0 deletions
100
...y/enforcer/org.wso2.apk.enforcer/src/main/resources/META-INF/native-image/jni-config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
[ | ||
{ | ||
"name":"[B" | ||
}, | ||
{ | ||
"name":"[Lcom.sun.management.internal.DiagnosticCommandArgumentInfo;" | ||
}, | ||
{ | ||
"name":"[Lcom.sun.management.internal.DiagnosticCommandInfo;" | ||
}, | ||
{ | ||
"name":"[Ljava.lang.String;" | ||
}, | ||
{ | ||
"name":"com.sun.management.internal.DiagnosticCommandArgumentInfo", | ||
"methods":[{"name":"<init>","parameterTypes":["java.lang.String","java.lang.String","java.lang.String","java.lang.String","boolean","boolean","boolean","int"] }] | ||
}, | ||
{ | ||
"name":"com.sun.management.internal.DiagnosticCommandInfo", | ||
"methods":[{"name":"<init>","parameterTypes":["java.lang.String","java.lang.String","java.lang.String","java.lang.String","java.lang.String","java.lang.String","boolean","java.util.List"] }] | ||
}, | ||
{ | ||
"name":"io.grpc.netty.shaded.io.netty.internal.tcnative.Buffer" | ||
}, | ||
{ | ||
"name":"io.grpc.netty.shaded.io.netty.internal.tcnative.CertificateCallbackTask", | ||
"methods":[{"name":"<init>","parameterTypes":["long","byte[]","byte[][]","io.grpc.netty.shaded.io.netty.internal.tcnative.CertificateCallback"] }] | ||
}, | ||
{ | ||
"name":"io.grpc.netty.shaded.io.netty.internal.tcnative.CertificateVerifierTask", | ||
"methods":[{"name":"<init>","parameterTypes":["long","byte[][]","java.lang.String","io.grpc.netty.shaded.io.netty.internal.tcnative.CertificateVerifier"] }] | ||
}, | ||
{ | ||
"name":"io.grpc.netty.shaded.io.netty.internal.tcnative.Library" | ||
}, | ||
{ | ||
"name":"io.grpc.netty.shaded.io.netty.internal.tcnative.NativeStaticallyReferencedJniMethods" | ||
}, | ||
{ | ||
"name":"io.grpc.netty.shaded.io.netty.internal.tcnative.SSL" | ||
}, | ||
{ | ||
"name":"io.grpc.netty.shaded.io.netty.internal.tcnative.SSLContext" | ||
}, | ||
{ | ||
"name":"io.grpc.netty.shaded.io.netty.internal.tcnative.SSLPrivateKeyMethodDecryptTask", | ||
"methods":[{"name":"<init>","parameterTypes":["long","byte[]","io.grpc.netty.shaded.io.netty.internal.tcnative.AsyncSSLPrivateKeyMethod"] }] | ||
}, | ||
{ | ||
"name":"io.grpc.netty.shaded.io.netty.internal.tcnative.SSLPrivateKeyMethodSignTask", | ||
"methods":[{"name":"<init>","parameterTypes":["long","int","byte[]","io.grpc.netty.shaded.io.netty.internal.tcnative.AsyncSSLPrivateKeyMethod"] }] | ||
}, | ||
{ | ||
"name":"io.grpc.netty.shaded.io.netty.internal.tcnative.SSLPrivateKeyMethodTask", | ||
"fields":[{"name":"resultBytes"}] | ||
}, | ||
{ | ||
"name":"io.grpc.netty.shaded.io.netty.internal.tcnative.SSLSession" | ||
}, | ||
{ | ||
"name":"io.grpc.netty.shaded.io.netty.internal.tcnative.SSLTask", | ||
"fields":[{"name":"complete"}, {"name":"returnValue"}] | ||
}, | ||
{ | ||
"name":"java.lang.Boolean", | ||
"methods":[{"name":"getBoolean","parameterTypes":["java.lang.String"] }] | ||
}, | ||
{ | ||
"name":"java.lang.Exception" | ||
}, | ||
{ | ||
"name":"java.lang.IllegalArgumentException" | ||
}, | ||
{ | ||
"name":"java.lang.NullPointerException" | ||
}, | ||
{ | ||
"name":"java.lang.OutOfMemoryError" | ||
}, | ||
{ | ||
"name":"java.lang.SecurityManager", | ||
"fields":[{"name":"initialized"}] | ||
}, | ||
{ | ||
"name":"java.lang.String", | ||
"methods":[{"name":"<init>","parameterTypes":["byte[]"] }, {"name":"getBytes","parameterTypes":[] }] | ||
}, | ||
{ | ||
"name":"java.util.Arrays", | ||
"methods":[{"name":"asList","parameterTypes":["java.lang.Object[]"] }] | ||
}, | ||
{ | ||
"name":"org.wso2.apk.enforcer.server.AuthServer", | ||
"methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }] | ||
}, | ||
{ | ||
"name":"sun.management.VMManagementImpl", | ||
"fields":[{"name":"compTimeMonitoringSupport"}, {"name":"currentThreadCpuTimeSupport"}, {"name":"objectMonitorUsageSupport"}, {"name":"otherThreadCpuTimeSupport"}, {"name":"remoteDiagnosticCommandsSupport"}, {"name":"synchronizerUsageSupport"}, {"name":"threadAllocatedMemorySupport"}, {"name":"threadContentionMonitoringSupport"}] | ||
} | ||
] |
Oops, something went wrong.