Thank-you for upgrading softhsm2. Without changing anything, the software functions on FreeBSD 11.1Stable for both i386 and amd64. However if the directories.tokendir changes from the default in softhsm2.conf, this results on both platforms: # softhsm2-util --init-token --free --label "Cute label" --so-pin abcdef --pin 123456 ERROR: Could not initialize the PKCS#11 library/module: /usr/local/lib/softhsm/libsofthsm2.so ERROR: Please check log files for additional information. (Aside: there was no logging information) In our case we prefer directories.tokendir = /var/lib/softhsm/tokens/ We tried changes in the Makefile around STATE_DIR?= /var # Previously /usr/local/var TOKEN_DIR?= ${STATE_DIR}/lib/softhsm/tokens # Used in pkg-plist CONFIGURE_ARGS+= --datarootdir=${TOKEN_DIR} --localstatedir=${STATE_DIR} but were unsuccessful. Why it matters? Once built and functional /usr is mounted read-only.
Yes, it is something I planned to change and all the time seem to forget. I'll send a patch (with some other minor fixes as well) ASAP
Created attachment 185231 [details] patch to fix problem Dear Committer, please add the following message to /usr/ports/UPDATING: As of version 2.3.0_1, the storage directory for softhsm has changed from /usr/local/var/lib/softhsm to /var/lib/softhsm Features: Path change for token storage directory Changes: Use pkgconf for proper install Ignore GOST for openssl-devel
Overtaken by events This is now in the latest release, see also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221515
Attachment 185231 [details] applies cleanly for me.
A commit references this bug: Author: swills Date: Fri Aug 18 16:09:59 UTC 2017 New revision: 448254 URL: https://svnweb.freebsd.org/changeset/ports/448254 Log: security/softhsm2: fix storage directory PR: 221212 Submitted by: jaap@NLnetLabs.nl (maintainer) Reported by: dewayne@heuristicsystems.com.au Changes: head/security/softhsm2/Makefile head/security/softhsm2/files/pkg-message.in head/security/softhsm2/pkg-plist
Committed, thanks!