Skip to content
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

Sign multiple files #76

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

guillomovitch
Copy link

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.

@leifj
Copy link
Contributor

leifj commented Oct 27, 2023

hey - can you look at the conflicts?

@guillomovitch
Copy link
Author

Done, here is a cleaner version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants