Skip to content

Commit 94ac51f

Browse files
committed
Implement Strict Layout Rules for WSS 1.0
1 parent 950140c commit 94ac51f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/zeep/wsse/signature.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def _signature_prepare(envelope, key, signature_method, digest_method, signature
242242

243243
# Insert the Signature node in the wsse:Security header.
244244
security = get_security_header(envelope)
245-
security.insert(0, signature)
245+
security.append(signature)
246246

247247
# Perform the actual signing.
248248
ctx = xmlsec.SignatureContext()
@@ -316,7 +316,7 @@ def _sign_envelope_with_key_binary(
316316
)
317317
ref.attrib["URI"] = "#" + ensure_id(bintok)
318318
bintok.text = x509_data.find(QName(ns.DS, "X509Certificate")).text
319-
security.insert(1, bintok)
319+
security.insert(0, bintok)
320320
x509_data.getparent().remove(x509_data)
321321

322322

0 commit comments

Comments
 (0)