Skip to content

Commit

Permalink
Default the signature alg when not specified.
Browse files Browse the repository at this point in the history
  • Loading branch information
wparad committed Nov 20, 2024
1 parent 106f0c2 commit 75d6c5a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ export const signXml = (

const transforms = options.xmlSignatureTransforms || defaultTransforms;
const sig = new xmlCrypto.SignedXml();
if (options.signatureAlgorithm != null) {
sig.signatureAlgorithm = algorithms.getSigningAlgorithm(options.signatureAlgorithm);
}
sig.signatureAlgorithm = algorithms.getSigningAlgorithm(options.signatureAlgorithm);
sig.addReference(xpath, transforms, algorithms.getDigestAlgorithm(options.digestAlgorithm));
sig.signingKey = options.privateKey;
sig.computeSignature(xml, {
Expand Down

0 comments on commit 75d6c5a

Please sign in to comment.