diff options
| author | Anton Gerasimov <anton.gerasimov@here.com> | 2018-09-21 18:41:25 +0200 |
|---|---|---|
| committer | Anton Gerasimov <tossel@gmail.com> | 2018-10-01 10:44:50 +0200 |
| commit | 9b8a6dd191cf441463ce5dfc6e20af11a56f71a3 (patch) | |
| tree | b37b5f938a2d0ad9b3b849642b8346a9e8e96e21 | |
| parent | 673a4b91d1794b7c89265ba3dd62febf8826e14f (diff) | |
| download | meta-updater-9b8a6dd191cf441463ce5dfc6e20af11a56f71a3.tar.gz | |
Fix creating SoftHSM token
| -rw-r--r-- | recipes-support/softhsm-testtoken/files/createtoken.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/recipes-support/softhsm-testtoken/files/createtoken.sh b/recipes-support/softhsm-testtoken/files/createtoken.sh index b142945..fa4569d 100644 --- a/recipes-support/softhsm-testtoken/files/createtoken.sh +++ b/recipes-support/softhsm-testtoken/files/createtoken.sh | |||
| @@ -13,7 +13,8 @@ fi | |||
| 13 | mkdir -p /var/lib/softhsm/tokens | 13 | mkdir -p /var/lib/softhsm/tokens |
| 14 | softhsm2-util --init-token --slot 0 --label "Virtual token" --pin 1234 --so-pin 1234 | 14 | softhsm2-util --init-token --slot 0 --label "Virtual token" --pin 1234 --so-pin 1234 |
| 15 | 15 | ||
| 16 | softhsm2-util --import /var/sota/import/pkey.pem --label "pkey" --id 02 --token 'Virtual token' --pin 1234 | 16 | openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in /var/sota/import/pkey.pem -out /var/sota/import/pkey.p8 |
| 17 | softhsm2-util --import /var/sota/import/pkey.p8 --label "pkey" --id 02 --token 'Virtual token' --pin 1234 | ||
| 17 | openssl x509 -outform der -in /var/sota/import/client.pem -out /var/sota/import/client.der | 18 | openssl x509 -outform der -in /var/sota/import/client.pem -out /var/sota/import/client.der |
| 18 | pkcs11-tool --module=/usr/lib/softhsm/libsofthsm2.so --id 1 --write-object /var/sota/import/client.der --type cert --login --pin 1234 | 19 | pkcs11-tool --module=/usr/lib/softhsm/libsofthsm2.so --id 1 --write-object /var/sota/import/client.der --type cert --login --pin 1234 |
| 19 | 20 | ||
