Skip to content

Commit

Permalink
Use dataclass.replace in SignatureReference construction. Fixes #231
Browse files Browse the repository at this point in the history
  • Loading branch information
kislyuk committed Aug 6, 2023
1 parent 5e0cc15 commit a88eebb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion signxml/signer.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def _get_c14n_inputs_from_references(self, doc_root, references: List[SignatureR
for reference in references:
uri = reference.URI if reference.URI.startswith("#") else "#" + reference.URI
c14n_inputs.append(self.get_root(self._resolve_reference(doc_root, {"URI": uri})))
new_references.append(SignatureReference(URI=uri, c14n_method=reference.c14n_method))
new_references.append(replace(reference, URI=uri))
return c14n_inputs, new_references

def _unpack(self, data, references: List[SignatureReference]):
Expand Down

0 comments on commit a88eebb

Please sign in to comment.