Skip to content

Commit

Permalink
docu
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdjulian committed Jul 3, 2023
1 parent 79a29a7 commit 0fa2ecc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package de.cmdjulian.graal.bouncycastle

import org.graalvm.nativeimage.hosted.Feature
import org.graalvm.nativeimage.hosted.Feature.AfterRegistrationAccess
import org.graalvm.nativeimage.hosted.RuntimeClassInitialization
import java.security.Provider
import java.security.Security

Expand All @@ -21,6 +22,11 @@ class BouncyCastleFeature : Feature {
}

println("INFO: found and registered bouncy castle")
RuntimeClassInitialization.initializeAtBuildTime("org.bouncycastle")
RuntimeClassInitialization.initializeAtRunTime(
"org.bouncycastle.jcajce.provider.drbg.DRBG\$Default",
"org.bouncycastle.jcajce.provider.drbg.DRBG\$NonceAndIV",
)
Security.addProvider(clazz.getConstructor().newInstance() as Provider)
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
Args = --features=de.cmdjulian.graal.bouncycastle.BouncyCastleFeature \
--initialize-at-build-time=org.bouncycastle \
--initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG$Default,org.bouncycastle.jcajce.provider.drbg.DRBG$NonceAndIV
Args = --features=de.cmdjulian.graal.bouncycastle.BouncyCastleFeature

0 comments on commit 0fa2ecc

Please sign in to comment.