Skip to content

using osslsigncode with cloudhsm #431

Closed
@jyanga

Description

@jyanga

hi. I saw the closed issue regarding this but I still cannot get it working. I am hoping that you guys may help me with getting it working. I have tried may things and the closest I got is using the distros' osslsigncode with the CloudHSM module. Below is the error I encounterred.

$ TEMPDIR='/app/cloudhsm'
$ export HSM_USER=testuser
$ export HSM_PASSWORD=testpassword
$ export n3fips_password="$HSM_USER:$HSM_PASSWORD"
$ sudo osslsigncode sign \
>     -pkcs11module /opt/cloudhsm/lib/libcloudhsm_pkcs11.so \
>     -key pkcs11:token="hsm1;object=cloud_hsm_label" \
>     -certs /opt/cloudhsm/etc/cert_for_login.crt \
>     -pass $HSM_PASSWORD \
>     -ts 'http://timestamp.digicert.com' \
>     -i 'https://www.example.com' \
>     -n cloud_hsm_label \
>     -h sha256 \
>     -in $TEMPDIR/sample_unsigned.dll \
>     -out $TEMPDIR/sample_signed.dll
Engine "pkcs11" set.

Unable to enumerate private keys
Login failed
Login to token failed, returning NULL...
PKCS11_get_private_key returned NULL
Failed to load private key pkcs11:token=hsm1;object=cloud_hsm_label
140364728805440:error:820740A0:PKCS#11 module:pkcs11_login:PIN incorrect:p11_slot.c:240:
140364728805440:error:26096080:engine routines:ENGINE_load_private_key:failed loading private key:crypto/engine/eng_pkey.c:78:
Failed

Help.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions