Skip to content

Conversation

@cconlon
Copy link
Member

@cconlon cconlon commented Jan 21, 2026

This PR adds a new System property support for wolfssl.skipLibraryLoad to skip automatic System.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 in WolfObject.java.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for a new System property wolfssl.skipLibraryLoad that allows applications to skip automatic native library loading and manage library loading manually. This is useful for applications that bundle native libraries inside JAR files and need custom loading behavior.

Changes:

  • Added wolfssl.skipLibraryLoad system property support to skip automatic System.loadLibrary() calls
  • Implemented library load skip tracking via libraryLoadSkipped flag and public isLibraryLoadSkipped() method in WolfObject
  • Updated both WolfObject and FeatureDetect classes to check the property and conditionally skip library loading
  • Added comprehensive test coverage in new WolfObjectTest class
  • Documented the feature with usage examples in README.md

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/main/java/com/wolfssl/wolfcrypt/WolfObject.java Added property check, libraryLoadSkipped tracking, and public isLibraryLoadSkipped() API method. Conditionally skips System.loadLibrary() calls while preserving init() and FIPS CAST execution
src/main/java/com/wolfssl/wolfcrypt/FeatureDetect.java Added property check to conditionally skip library loading, matching WolfObject behavior
src/test/java/com/wolfssl/wolfcrypt/test/WolfObjectTest.java New test class with comprehensive coverage of the skip library load feature
src/test/java/com/wolfssl/wolfcrypt/test/WolfCryptTestSuite.java Added WolfObjectTest to the test suite
README.md Added detailed documentation section explaining the feature with usage examples and programmatic check method

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cconlon cconlon force-pushed the skipNativeLibLoading branch from 71f0a44 to 793c3eb Compare January 21, 2026 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant