Skip to content

Resolve relative URI for local file #15

Description

@Qubitza

Issue Context

I want to create a XML signature that includes a referenced file.

e.g. I want to include the content of the data.json next to my xml file in the signature:

      <Reference URI="data.json">
        <DigestMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#sha384" />
        <DigestValue></DigestValue>
      </Reference>

This will not work, as the default xmlSecTransformUriTypeLocal requires the URI to start with file:/// (and actually to be absolute).

However, this leads to the problem of validating the files on a different machine. It would require the data.json also to lie in the exact same absolute path.

Proposal

The xmlsec1 CLI allows the user to define a --url-map that

maps a given to the given for loading external resources

It seems that this is a CLI only feature which registers callbacks to resolve the mapped URIs differently.
I would love a similar feature to be part of this wrapper.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions