Skip to content

Commit aae6fb7

Browse files
authored
Ensure softhsm worked with local build from source (#1006)
1 parent e3fff12 commit aae6fb7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

impl/src/test/groovy/io/jsonwebtoken/impl/security/Pkcs11Test.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class Pkcs11Test {
3939
'/opt/homebrew/lib/softhsm/libsofthsm2.so', // macos: brew install softhsm
4040
'/usr/lib/softhsm/libsofthsm2.so', // ubuntu: sudo apt-get install -y softhsm2
4141
'/usr/local/lib/libsofthsm2.so', // other *nixes?
42+
'/usr/local/lib/softhsm/libsofthsm2.so',
4243
'C:\\SoftHSM2\\lib\\softhsm2-x64.dll', // https://github.com/disig/SoftHSM2-for-Windows
4344
'C:\\SoftHSM2\\lib\\softhsm2.dll' // https://github.com/disig/SoftHSM2-for-Windows
4445
]

impl/src/test/scripts/softhsm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ _setup() {
112112
platform='macos'
113113
globalconf='/opt/homebrew/etc/softhsm/softhsm2.conf'
114114
libsofthsm2='/opt/homebrew/lib/softhsm/libsofthsm2.so'
115+
if [[ ! -f "${libsofthsm2}" ]]; then # backup (build softhsm from source)
116+
libsofthsm2='/usr/local/lib/softhsm/libsofthsm2.so'
117+
fi
115118
if [[ ! -f "${libsofthsm2}" ]]; then # assume CI (Ubuntu)
116119
platform='ubuntu'
117120
globalconf='/etc/softhsm/softhsm2.conf'

0 commit comments

Comments
 (0)