I would like to import a public key for convenience to the NitroKey HSM2, as other keys on the HSM are signed with its private counter part. Unfortunately, I’m struggling with these commands:
> pkcs11-tool -l -p *** --label "test" --type pubkey --module opensc-pkcs11.so --write-object pubkey.der --type pubkey --id 1234 Using slot 0 with a present token (0x0) Created public key: Public Key Object; RSA 4096 bits label: test ID: 1234 Usage: verify > pkcs11-tool -r -p *** --label "test" --type pubkey --module opensc-pkcs11.so > pubkey_2.der Using slot 0 with a present token (0x0) error: object not found Aborting.
Is it possible to import pubkeys? What am I doing wrong?
Help is appreciated …