Skip to content

Commit

Permalink
Fix softokn detection on macOS
Browse files Browse the repository at this point in the history
Loadable modules on macOS should use .so as extension, but both NSS
softokn and OpenSSL providers do not follow this rule. Modify shlext
accordingly so that NSS softokn can be found for the tests.

Note that p11-kit correctly names its loadable modules with .so, so this
variable should be used carefully as it may be incorrect depending on
your use case.

Signed-off-by: Clemens Lang <[email protected]>
  • Loading branch information
neverpanic authored and ueno committed Apr 11, 2024
1 parent 39aa052 commit a656cc5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ libssl = dependency('libssl', version: '>= 3.0.7')
host_system = host_machine.system()
if host_system == 'windows'
shlext = '.dll'
elif host_system == 'darwin'
# On macOS, loadable modules typically use .so as filename extension, but
# both NSS softokn and OpenSSL providers ignore this rule and use .dylib for
# loadable modules anyway. Note that p11-kit correctly uses .so, though, so
# be careful when using this variable, as it might not be correct on macOS.
shlext = '.dylib'
else
shlext = '.so'
endif
Expand Down

0 comments on commit a656cc5

Please sign in to comment.