Closed haumenphai closed 2 months ago
@MatthiasValvekens please help me fix this to sign FDF with USB token.I really need it
Please read the entry in the FAQ on this topic. Issues with hardware accessed over PKCS#11 are (a) extremely hard to troubleshoot without having access to the hardware in question, and (b) almost never related to bugs in pyHanko.
This holds up here: your stack trace comes from within the Cython code in python-pkcs11, so the problem is either with that library, or (more likely) a bug in the PKCS#11 implementation itself. I suggest taking this up with the vendor of your signing hardware, they're almost surely in a better position to help.
I'm going to close this issue since there's no indication that pyHanko is doing anything wrong here (so there's no actionable bug), but feel free to start a thread in the discussion forum if you want.
EDIT: you may also want to double-check what the IDs/labels of the private key object(s) on your token are. Passing those explicitly is often a better idea than letting pyHanko guess from context.
Describe the bug ERROR: Sign with USB token (pkcs11).
I got an error when run this code.Please help me.
This is traceback:
My python: 3.10, pip list: