You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pull request enhances the way the getYkcs11Library() method in YubiKey.java locates the YubiKey PKCS#11 library, making it more flexible and robust, especially for custom and MacOS environments.
Improvements to library discovery:
Added support for specifying a custom PKCS#11 library path via the PKCS11_MODULE environment variable, allowing users to override the default search logic.
Improved MacOS support by searching multiple common locations for libykcs11.dylib, including paths from the DYLD_LIBRARY_PATH environment variable, increasing compatibility with different installation methods.
Thank you for the suggestion. Do you know which Homebrew package provides libykcs11.dylib? I couldn't find it.
I'm not familiar with macOS, in which case is DYLD_LIBRARY_PATH used?
I'm not convinced by the PKCS11_MODULE environment variable, I tend to think that for a custom path to libykcs11 the best is to use the PKCS11 storetype with a standard SunPKCS configuration file specifying the path to the library.
Also keep in mind that you can replace the YUBIKEY storetype with PIV and simply ditch the ykcs11 library (in this mode Jsign bypasses the PKCS#11 library and talks to the Yubikey directly).
I'm not familiar with macOS, in which case is DYLD_LIBRARY_PATH used?
DYLD_LIBRARY_PATH is an environment variable in macOS, used to specify directories where the system should search for dynamic library (.dylib) files. It helps the operating system locate the necessary libraries during the execution of programs.
I'm not convinced by the PKCS11_MODULE environment variable, I tend to think that for a custom path to libykcs11 the best is to use the PKCS11 storetype with a standard SunPKCS configuration file specifying the path to the library.
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
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 pull request enhances the way the
getYkcs11Library()method inYubiKey.javalocates the YubiKey PKCS#11 library, making it more flexible and robust, especially for custom and MacOS environments.Improvements to library discovery:
PKCS11_MODULEenvironment variable, allowing users to override the default search logic.libykcs11.dylib, including paths from theDYLD_LIBRARY_PATHenvironment variable, increasing compatibility with different installation methods.