Package: pkcs11-daemon
Version: 0.4.1-2
Severity: normal

Dear Thorsten,

as-is, the pkcs11-daemon package is obscure to use, as the USAGE file is
not made available in …/docs/ or …/examples. 

A sample systemd service would be nice, using an
/etc/default/pkcs11-daemon file for example.

In my case, I've restorted to manually creating the following service:

/etc/systemd/system/pkcs11-daemon.service
  [Unit]
  Description=PKCS#11 daemon
  After=network-online.target
  
  [Service]
  Type=simple
  Environment=PKCS11_DAEMON_SOCKET="tls://[::]:2345"
  Environment=PKCS11_PROXY_TLS_PSK_FILE="/var/lib/pkcs11-daemon/softhsm2.psk"
  ExecStart=/usr/bin/pkcs11-daemon /usr/lib/softhsm/libsofthsm2.so
  Restart=on-failure
  
  [Install]
  WantedBy=multi-user.targe

I've create the psk file with:

  mkdir -p /var/lib/pkcs11-daemon
  (echo -n "softhsm2:" ; head -c 4096 /dev/urandom | sha256sum | cut -b1-32) > 
/var/lib/pkcs11-daemon/softhsm2.psk
  chmod 0600 /var/lib/pkcs11-daemon/softhsm2.psk

It's just a simple throw at getting this up-and-running though.

Would you be welcoming a patch? Would you also consider putting this on
Salsa (there's no documented Vcs).

Best,
OdyX

Reply via email to