pyauth / python-pkcs11

PKCS#11/Cryptoki support for Python
MIT License
150 stars 71 forks source link

Typo in "Applied" docs - Generating Keys #155

Open xyakimo1 opened 1 year ago

xyakimo1 commented 1 year ago

https://github.com/danni/python-pkcs11/blob/e35e6c45e3dcaaa1511262121ff4ab6769de941e/docs/applied.rst?plain=1#LL367C32-L367C42

Should be Storing keys requires a read/write session. instead because:

  1. When a session is opened as read only I get the following exception when generating a key with store=True:
File "pkcs11/_pkcs11.pyx", line 488, in pkcs11._pkcs11.Session.generate_key
File "pkcs11/_errors.pyx", line 88, in pkcs11._pkcs11.assertRV
pkcs11.exceptions.SessionReadOnly

And when a session is opened as read/write, everything is fine.

  1. It just doesn't make sence..