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

Extend builder to allow for x509 issuer serial parameter specifiying #11

Open
lweberk opened this issue Jun 30, 2023 · 2 comments
Open

Comments

@lweberk
Copy link

lweberk commented Jun 30, 2023

@lweberk I'm happy to extend the builder for what I need as opposed to just exposing the raw functionality.

The only feature that is lacking for me (right now) is that I can't add the X509IssuerSerial block into the x509data.

 <dsig:X509IssuerSerial>
     <dsig:X509IssuerName>redacted</dsig:X509IssuerName>
     <dsig:X509SerialNumber>redacted</dsig:X509SerialNumber>
 </dsig:X509IssuerSerial>

Maybe we just add another option? x509issuer_serial(bool) (that defaults to false)?

doc.template()
        .canonicalization(XmlSecCanonicalizationMethod::ExclusiveC14N)
        .signature(XmlSecSignatureMethod::RsaSha1)
        .keyname(true)
        .keyvalue(true)
        .x509data(true)
        .x509issuer_serial(true)
        .uri("ReferencedID")
        .done();

All that issuer data is in the cert (obviously), which has already been given to the context. I'm not sure if xmlsec can get at it on its own as I am not very familiar with the library, I use https://docs.rs/openssl/latest/openssl/ for my use case.

Originally posted by @JoshuaNitschke in #5 (comment)

@lweberk
Copy link
Author

lweberk commented Jun 30, 2023

@JoshuaNitschke would you like to push these changes (if you have them) upstream? While I'm already at it, I'd gladly accept a PR down this line.

@JoshuaNitschke
Copy link
Contributor

@lweberk I never got to it unfortunately! I ended up doing a super hacky find and replace on the xml. 🥇

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

No branches or pull requests

2 participants