-
-
Notifications
You must be signed in to change notification settings - Fork 108
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 for X509IssuerSerial #152
Comments
Partial duplicate of #39. |
The spec notes that This doesn't seem to be exploitable, because the verifier will be pinning the certificate by other means anyway. So in principle we could support this. In light of this being deprecated, can you note the application where you expect to need this, for our reference? |
https://www.w3.org/TR/xmldsig-core1/#sec-X509Data:
The serial number is unique per issuer, and I'm integrating with a large third-party service that only sends |
Released a fix in v2.8.0, please test:
|
@RJPercival when you have a moment, can you confirm that the new API works for you? |
I've given it a try but ran into this bug in OpenSSL when using self-signed certificates: openssl/openssl#1418.
I guess #141 might get around that, otherwise I'll have to ask the third party I'm integrating with to re-issue their certificate with different |
A nit about the API was that I can pass a |
Not validating against the schema does not carry any security risks that I am aware of, as long as you use only what is signed. It is primarily an interoperability tool. You could also use a fork of signxml and change the schema file to remove the assertion on the integer size. (Perhaps the solution here is to just use that forked schema in signxml by default.) |
Have you considered a different schema validator? It seems the reason that lxml rejects serial numbers longer than 18 digits is because it's a "minimally-conforming" schema validator, and so isn't required to support more digits than that. However, there are other schema validators, e.g. xmlschema, that do support the extra digits. I assume you're using lxml because it avoids introducing another dependency? |
Thanks for pointing that out. That's correct, lxml provides a whole bunch of things that signxml uses, including schema validation, so I use it to minimize the number of dependencies. I'll take a look at xmlschema, thanks. I might also look for a workaround in the lxml configuration or permanently bundle an edited version of the schema. |
@kislyuk I've just discovered that |
This library is expected to be used in an application where there's no ambiguity about the algorithm, just a limited set of rotating or user-specific certs which can unambiguously be identified by their digest. Can you give an example of the situation in which this extra data is necessary? |
There are 5 digest algorithms allowed by the XMLDSig standard. The signer can use any of these, but the verifier would have to try all of them with every known certificate in order to find a match without knowing which algorithm was used. |
It would be useful if signxml could output
X509IssuerSerial
as well asX509Certificate
, for interoperating with systems that only support the former. Similarly, it would be helpful if it could select the correct certificate to use based on the values in this element.I am aware that
sign()
has akey_info
parameter that makes it possible to provide aKeyInfo
element containing both, but it'd be great if this was handled by the library. Otherwise, the caller has to parse the certificate and construct the correct XML themselves.The text was updated successfully, but these errors were encountered: