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

P11tool Initialization of Token Fails #105

Closed
agilesai1294 opened this issue Sep 4, 2019 · 3 comments
Closed

P11tool Initialization of Token Fails #105

agilesai1294 opened this issue Sep 4, 2019 · 3 comments

Comments

@agilesai1294
Copy link

Hi,

I am trying to follow the steps to set up PKCS on my Raspberry Pi Zero. WHen I followed the step to initialize token I got the following error.

pi@raspberrypi:~ $ p11tool --list-all
warning: no token URL was provided for this operation; the available tokens are:

pkcs11:model=p11-kit-trust;manufacturer=PKCS%2311%20Kit;serial=1;token=System%20Trust
pkcs11:model=ATECC608A;manufacturer=Microchip%20Technology%20Inc;serial=946EEF92A0E7;token=0123EE

pi@raspberrypi:~ $ p11tool --initialize "pkcs11:serial=946EEF92A0E7" --label Testing --provider /usr/lib/libcryptoauth.so
Enter Security Officer's PIN:
Initializing token...
Error in pkcs11_init:1439: PKCS #11 error.

pi@raspberrypi:~ $ p11tool --export-pubkey --provider /usr/lib/libcryptoauth.so "pkcs11:token=0123EE;object=device;type=private"
warning: --login was not specified and it may be required for this operation.
warning: no --outfile was specified and the public key will be printed on screen.
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEWyEMy85xZUCWkvSRTzNXeA8zP9IZ
1eJ/jVBWaag3sxyVd5d2OyvAIs41bxH4pr06Q8aBT/xuVQmYfslEKjk8Yg==
-----END PUBLIC KEY-----

@bryan-hunt
Copy link
Contributor

Duplicate of #95. Your token was successfully initialized and ready for use.

The reported error is a false report and the source of it is being investigated.

@agilesai1294
Copy link
Author

@bryan-hunt Token isnt initialized.

pi@raspberrypi:~ $ p11tool --initialize "pkcs11:serial=946EEF92A0E7" --label greengrass
Enter Security Officer's PIN:
Initializing token...
Error in pkcs11_init:1439: PKCS #11 error.
pi@raspberrypi:~ $ p11tool --list-all
warning: no token URL was provided for this operation; the available tokens are:

pkcs11:model=p11-kit-trust;manufacturer=PKCS%2311%20Kit;serial=1;token=System%20Trust
pkcs11:model=ATECC608A;manufacturer=Microchip%20Technology%20Inc;serial=946EEF92A0E7;token=0123EE

@bryan-hunt
Copy link
Contributor

--list-all with multiple tokens only displays the tokens. You need to tell it which token to display the objects for. If the token was not initialized the following command would have failed:

 p11tool --export-pubkey --provider /usr/lib/libcryptoauth.so "pkcs11:token=0123EE;object=device;type=private"

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

No branches or pull requests

2 participants