Skip to content

Commit

Permalink
Implement Strict Layout Rules for WSS 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
blaggacao committed Sep 21, 2024
1 parent 950140c commit 94ac51f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/zeep/wsse/signature.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def _signature_prepare(envelope, key, signature_method, digest_method, signature

# Insert the Signature node in the wsse:Security header.
security = get_security_header(envelope)
security.insert(0, signature)
security.append(signature)

# Perform the actual signing.
ctx = xmlsec.SignatureContext()
Expand Down Expand Up @@ -316,7 +316,7 @@ def _sign_envelope_with_key_binary(
)
ref.attrib["URI"] = "#" + ensure_id(bintok)
bintok.text = x509_data.find(QName(ns.DS, "X509Certificate")).text
security.insert(1, bintok)
security.insert(0, bintok)
x509_data.getparent().remove(x509_data)


Expand Down

0 comments on commit 94ac51f

Please sign in to comment.