You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jtalir first thing I would check is whether you can sign/verify or encrypt/decrypt the document with just xmlsec1 - there's the command line tool for that. As for building against xmlsec1-nss - never done that, but I suppose this should be possible once the constants that are not supported by the NSS engine are sorted out in constants.c. I will create an experimental branch you can build the package from, so you can try it out locally.
@jtalir try reinstalling from the same branch again. I have hardcoded nss as crypto engine for the sake of testing, otherwise xmlsec1 overwrites it for me - will need a better way of passing the crypto engine way than what's implemented currently.
Activity
jtalir commentedon Feb 15, 2021
NSS crypto engine in xmlsec should be capable of using PKCS11. Is it possible to switch to NSS crypto with python-xmlsec?
hoefling commentedon Feb 15, 2021
@jtalir first thing I would check is whether you can sign/verify or encrypt/decrypt the document with just
xmlsec1- there's the command line tool for that. As for building againstxmlsec1-nss- never done that, but I suppose this should be possible once the constants that are not supported by the NSS engine are sorted out inconstants.c. I will create an experimental branch you can build the package from, so you can try it out locally.hoefling commentedon Feb 15, 2021
@jtalir try out the
nss-cryptobranch:should build against
xmlsec1-nss. You need to install the lib first - on my Fedora 33, it'sdnf install xmlsec1-nss xmlsec1-nss-devel.jtalir commentedon Feb 15, 2021
Thanks. I was able to build it. Any hint where to provide content of --crypto-config parametr from CLI xmlsec1?
hoefling commentedon Feb 15, 2021
@jtalir this is yet missing :-) Let me add a sample impl first.
hoefling commentedon Feb 15, 2021
@jtalir try reinstalling from the same branch again. I have hardcoded
nssas crypto engine for the sake of testing, otherwisexmlsec1overwrites it for me - will need a better way of passing the crypto engine way than what's implemented currently.hoefling commentedon Feb 15, 2021
@jtalir you can pass the config path via
xmlsec.init:If it doesn't work, try a
shutdownbefore reinitialization:jtalir commentedon Feb 15, 2021
No success. Trying simple nss with local keystore (no pkcs11). Simple xmlsec1 call works, python script doesnt. See bellow:
jtalir commentedon Feb 15, 2021
Maybe it's related to the fact that in nss crypto engine, key is identified by name in template.
jtalir commentedon Dec 22, 2021
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?
jtalir commentedon Jan 21, 2022
Is anybody able to evaluate if this change in xmlsec-1.2.33 is callable via python-xmlsec?
Fix xmlsec#164 - Add support for loading keys from engine (e.g. pkcs11).
Fix xmlsec#164 - Add support for loading keys from engine (e.g. pkcs11).
fixup! Fix xmlsec#164 - Add support for loading keys from engine (e.g…
Fix xmlsec#164 - Add support for loading keys from engine (e.g. pkcs11).
Fix xmlsec#164 - Add support for loading keys from engine (e.g. pkcs11).
Fix xmlsec#164 - Add support for loading keys from engine (e.g. pkcs11).
Fix xmlsec#164 - Add tests for pkcs11 (softhsm) key.
Fix xmlsec#164 - Add support for loading keys from engine (e.g. pkcs11).
Fix xmlsec#164 - Add tests for pkcs11 (softhsm) key.