Add wolfssl.skipLibraryLoad System Property Support#325
Open
cconlon wants to merge 1 commit intowolfSSL:masterfrom
Open
Add wolfssl.skipLibraryLoad System Property Support#325cconlon wants to merge 1 commit intowolfSSL:masterfrom
wolfssl.skipLibraryLoad System Property Support#325cconlon wants to merge 1 commit intowolfSSL:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for a new wolfssl.skipLibraryLoad system property that allows applications to manually load native libraries instead of relying on the automatic System.loadLibrary() calls. This is useful for scenarios where native libraries are bundled inside JAR files or require custom loading logic.
Changes:
- Added
libraryLoadSkippedstatic field andisLibraryLoadSkipped()method to track skip state - Modified
loadLibrary()to check the system property and skip loading when set to "true" - Added comprehensive tests for the new functionality
- Updated documentation with usage examples and explanations
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/java/com/wolfssl/WolfSSL.java | Implements the skipLibraryLoad functionality with property checking, state tracking, and API method |
| src/test/com/wolfssl/test/WolfSSLTest.java | Adds three test methods to verify default behavior, property handling, and post-load property changes |
| README.md | Documents the new system property with clear examples for command-line and programmatic usage |
| native/com_wolfssl_WolfSSLCertificate.h | Formatting changes to JNI method declarations (unrelated cleanup) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new System property support for
wolfssl.skipLibraryLoadto skip automaticSystem.loadLibrary()calls.This allows applications to load native libraries manually via
System.load()with custom paths, which can be useful for bundling native libraries inside JAR files or doing other application-level library loading management.Native
init()and FIPS CAST still run regardless of skip setting inWolfSSL.java.Goes along with JCE addition of the same here: wolfSSL/wolfcrypt-jni#189