-
Notifications
You must be signed in to change notification settings - Fork 99
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
Fix #244 - Fix failing test with libxmlsec-1.2.36, also make libxmlse… #251
Conversation
ff60c2f
to
b0f48a3
Compare
I rebased it on #250 who fixed precommit.ci error with Python 3.11, so this should merge after #250. Would be nice if someone who understands XML singing would look at my commit (b0f48a3) and could confirm, that it's OK that |
If I understand the test correctly, the test signs file with an RSA key from "rsakey.pem". In this case, there is no certificate for the key thus there is nothing to write out any X509 information into the output. I am not sure if this is a good test but the current output is correct. You should consider using a key + cert from a pkcs12 file as a more realistic example. That should populate the X509Data (you should probably remove the X509Certificate content as well so it is "filled in" by xmlsec during signing). |
Side note -- would be great if you can test 1.3.0-rc candidates (latest is RC3: lsh123/xmlsec#612). There are quite a lot of changes and some are API/ABI breaking (lsh123/xmlsec#593). |
b0f48a3
to
2a1bf30
Compare
There is also I found that you marked the elements DEPRECATED (in docs/api/xmlsec-x509.html), so I figured that this might be intentional. Is it? |
Sorry I missed that there is a cert. In this case something is not correct. XMLSec should write out all the X509Data children nodes. Not sure what do you mean by "deprecated", which specific function was deprecated? |
Not a function, but elements, you can see it in the commit from you I linked (github folded the docs/api/xmlsec-x509.html because the diff is too big), you can see it also here: https://github.com/lsh123/xmlsec/blob/01e95e393275fee0328e37ca14f522eedc640810/docs/api/xmlsec-x509.html#L94 |
Ah that's just to move this code from public to private :) It's internals and nobody should be using it outside of xmlsec itself. |
This is current master (which will be 1.3.0 in a couple weeks). I removed bunch of stuff to make it easier to see the X509Data:
|
But indeed I see empty nodes in 1.2.37:
Let me investigate (lsh123/xmlsec#616) |
Thanks, it's indeed a change in behavior and the fix is here: It shouldn't have any real world impact since XMLSec code in 1.2.36 / 37 was selecting the "best" output (X509Certificate first, then subject, then ....). But nevertheless, I will rollout 1.2.38 with this (and a couple other bug fixes) soon. |
2a1bf30
to
9e052ab
Compare
9e052ab
to
2c58d43
Compare
…bxmlsec version available from Python.
So I added file with signed result for xmlsec-1.2.36 and 37 so tests will pass. Also added function for the version of xmlsec so we can do specific decisions on xmlsec version in clear way. Ready for CR. |
Fix failing test with libxmlsec-1.2.36, also make libxmlsec version available from Python.