-
Notifications
You must be signed in to change notification settings - Fork 100
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
Support PKCS11 #164
Comments
NSS crypto engine in xmlsec should be capable of using PKCS11. Is it possible to switch to NSS crypto with python-xmlsec? |
@jtalir first thing I would check is whether you can sign/verify or encrypt/decrypt the document with just |
@jtalir try out the $ PYXMLSEC_CRYPTO_ENGINE=nss pip install git+https://github.com/hoefling/xmlsec.git@nss-crypto should build against |
Thanks. I was able to build it. Any hint where to provide content of --crypto-config parametr from CLI xmlsec1? |
@jtalir this is yet missing :-) Let me add a sample impl first. |
@jtalir try reinstalling from the same branch again. I have hardcoded |
@jtalir you can pass the config path via import xmlsec
xmlsec.init('path/to/ssl.conf')
... If it doesn't work, try a import xmlsec
xmlsec.shutdown()
xmlsec.init('path/to/ssl.conf') |
No success. Trying simple nss with local keystore (no pkcs11). Simple xmlsec1 call works, python script doesnt. See bellow:
|
Maybe it's related to the fact that in nss crypto engine, key is identified by name in template. |
There is recent release of xmlsec-1.2.33 there is a new attribute --privkey-openssl-engine that can pass pkcs11 parameters to openssl engine as discussed in this thread https://www.aleksey.com/pipermail/xmlsec/2021/010434.html. How hard is it to get this through python-xmlsec to be able to use it the same way as command line client? |
Is anybody able to evaluate if this change in xmlsec-1.2.33 is callable via python-xmlsec? |
* Added changes to enable 3.11 builds * Fix xmlsec#244 - Fix failing test with libxmlsec-1.2.36, also make libxmlsec version available from Python. * Fix xmlsec#164 - Add support for loading keys from engine (e.g. pkcs11). * Fix xmlsec#164 - Add tests for pkcs11 (softhsm) key. * [pre-commit.ci] auto fixes from pre-commit.com hooks --------- Co-authored-by: Dan Vella <[email protected]> Co-authored-by: Tomas Divis <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
I'm not aware about any way how to use PKCS11 device (token, hsm) with this library. This is critical feature for many use cases.
The text was updated successfully, but these errors were encountered: