Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PKCS11 Clarification on Parameters #40

Closed
SaltySolomon opened this issue Apr 28, 2020 · 1 comment · Fixed by #39
Closed

PKCS11 Clarification on Parameters #40

SaltySolomon opened this issue Apr 28, 2020 · 1 comment · Fixed by #39

Comments

@SaltySolomon
Copy link

SaltySolomon commented Apr 28, 2020

I am currently trying to sign an executable with a hsm. I am unsure how the -key parameter works how to define the user to use for connecting to the hsm. I am using a luna safenet network hsm and got it running with pyhsm. But I now need executable suport.

I am currently using the following command:

osslsigncode sign -pkcs11engine /usr/lib64/engines-1.1/pkcs11.so -pkcs11module /usr/safenet/lunaclient/lib/libCryptoki2_64.so -certs ./Certificate.cer -key 0:100 -pass [Password] -verbose -in ./in.exe -out ./out.exe

And I am getting:

Login failed
Login to token failed, returning NULL...
PKCS11_get_private_key returned NULL
Failed to load private key 0:77
140226514693248:error:0D0680A8:asn1 encoding routines:asn1_check_tlen:wrong tag:crypto/asn1/tasn_dec.c:1130:
140226514693248:error:0D07803A:asn1 encoding routines:asn1_item_embed_d2i:nested asn1 error:crypto/asn1/tasn_dec.c:290:Type=PKCS7
140226514693248:error:0909006C:PEM routines:get_name:no start line:crypto/pem/pem_lib.c:745:
Failed

@SaltySolomon SaltySolomon changed the title PKCS11 Clarification for parameters PKCS11 Clarification on Parameters Apr 28, 2020
@olszomal
Copy link
Collaborator

I believe this issue may be helpful #34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants