pyXMLSecurity icon indicating copy to clipboard operation
pyXMLSecurity copied to clipboard

Sign multiple files

Open guillomovitch opened this issue 2 years ago • 2 comments

When signing multiple files with the same key/certificate pair (for instance, the 8132 files resulting from splitting edugain metadata into mdq ready-to-serve individual metadata files), calling xmlsec.sign() once par file results in a waste of resources, as the key and the certificate are read everytime.

This PR tries to address this issue with a Signer object, instantiated once, used multiple times, such as: signer = xmlsec.Signer(keyspec, certspec) output = signer.sign(input)

I'm not a Python expert, so the code can certainly get improved, but provided tests ensure at least it works as expected.

guillomovitch avatar Oct 20 '23 08:10 guillomovitch

hey - can you look at the conflicts?

leifj avatar Oct 27 '23 07:10 leifj

Done, here is a cleaner version.

guillomovitch avatar Nov 03 '23 11:11 guillomovitch