From bc8e209d6ead21b548e18729011bc399116e1c29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Trojnara?= Date: Thu, 22 Nov 2018 08:01:20 +0100 Subject: [PATCH] ported to SoftHSM2 --- ChangeLog | 1 + misc/softhsm-example-token/.gitignore | 3 -- misc/softhsm-example-token/README | 6 ++-- misc/softhsm-example-token/gen-token.sh | 47 +++++++------------------ 4 files changed, 16 insertions(+), 41 deletions(-) diff --git a/ChangeLog b/ChangeLog index e53bcb2..f27ec46 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ === 2.0 (2018-xx-xx) - ported to OpenSSL 1.1.x +- ported to SoftHSM2 - add support for pkcs11-based hardware tokens (Patch from Leif Johansson) - improved error reporting of timestamping errors diff --git a/misc/softhsm-example-token/.gitignore b/misc/softhsm-example-token/.gitignore index 99c273b..1b52ac6 100644 --- a/misc/softhsm-example-token/.gitignore +++ b/misc/softhsm-example-token/.gitignore @@ -1,5 +1,2 @@ -softhsm.conf test.* -openssl.conf config.py -softhsm.* diff --git a/misc/softhsm-example-token/README b/misc/softhsm-example-token/README index 0850b01..690843b 100644 --- a/misc/softhsm-example-token/README +++ b/misc/softhsm-example-token/README @@ -11,8 +11,8 @@ Type 'make' to generate a softhsm token with a test-key on id a1b2 with PIN-code "secret1". To use this token with osslsigncode try something like this (from this directory): -env SOFTHSM_CONF=`pwd`/softhsm.conf ../../osslsigncode sign \ - -pkcs11engine /usr/lib/engines/engine_pkcs11.so \ - -pkcs11module /usr/lib/softhsm/libsofthsm.so -key a1b2 -certs test.crt ... +../../osslsigncode sign \ + -pkcs11engine /usr/lib/engines-1.1/pkcs11.so \ + -pkcs11module /usr/lib/libsofthsm2.so -key a1b2 -certs test.crt ... Use 'secret1' as the password at the prompt. diff --git a/misc/softhsm-example-token/gen-token.sh b/misc/softhsm-example-token/gen-token.sh index fdd4d6e..4fd8c2d 100755 --- a/misc/softhsm-example-token/gen-token.sh +++ b/misc/softhsm-example-token/gen-token.sh @@ -1,46 +1,23 @@ #!/bin/bash -P11_ENGINE=/usr/lib/engines/engine_pkcs11.so -P11_MODULE=/usr/lib/softhsm/libsofthsm.so +export MODULE_PATH=/usr/lib/libsofthsm2.so -## - -export SOFTHSM_CONF=softhsm.conf -cat>config.py<config.py <softhsm.conf<openssl.conf<