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

fix: support Signature element on the root level #48

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

adamdecaf
Copy link
Member

@adamdecaf adamdecaf commented Feb 19, 2024

This PR contains support for selecting Signature elements that are a root level element.

Signed XML Example
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
    <SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
        <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
        <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
        <Reference URI="#test">
            <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
            <Transforms>
                <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
            </Transforms>
            <DigestValue>uTkKWNbF/FYTlRQPbSwW27afYnw=</DigestValue>
        </Reference>
    </SignedInfo>
    <SignatureValue>G1/jIIkOnkylVt1ddan9qC08u2Nlp1pu3NqhEYn4wr2QQpsIfn6ZnSdYHVAutt0fTkaAHi+h3dOdIJ1FpMsEY0OopDlbmvQQbEVe5wAfmRII/wXyzDCjTi+6apKmnaWhPlNwh7TxeYltTN32mOInpIUqEMcFn5C5Vkiwklok2fmbrGh4ENtGi/3vhlUmiCIoKW+VisYwGmphon+2Erdj5Lheq/mgja98uOrjZpRGv3oJ3iUn/ye8568Uv10xYMynSxMxth0PGy2kK2IyixSISO+bQGRDrLctqbZRDu+q/P4UXhvuFjh1LcNW7+n9YaAfqOI16l6zaZGA04mZSPfSpI2eiJxUKEOo+pizY2QYR0X8NozKDW7mBCTM6wdJwiKufOeu+nfvYJbEfMnru+dNZhi8Y1wTqf358CcNtjRzhc7rZYciyP/CC8v6BNXyMYhnNv6I/5ULTFVO+IDqwqbsJzC6NVvS6JjtCeYdNoQowXLO0TLslgbtnQWRMMFSmqRXGhzgThId5sDE6teScVz42lJIVr/B3soARoHBOJGy4AjVYLAqbMy8eLOUSG/C0SJWrHysnfpQr8wobaUEpzXi1j7YMORnMaK5vCJdVAByK5h98MwdRmRgpTh4HMjSNP8TDng2mw9+BoMrnwL6QUNKsGT8imY0WMfFI6LBZqIqN54=</SignatureValue>
    <KeyInfo>
        <X509Data>
            <X509Certificate>testtest</X509Certificate>
        </X509Data>
    </KeyInfo>
    <Object xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Id="test">
      <Foo>name</Foo>
    </Object>
</Signature>

Issues: #47

This was referenced Feb 19, 2024
@adamdecaf adamdecaf merged commit 4503928 into master Feb 19, 2024
3 checks passed
@adamdecaf adamdecaf deleted the root-signature-element branch February 19, 2024 19:46
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.

1 participant