We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4df3830 commit a9f767dCopy full SHA for a9f767d
1 file changed
src/zeep/wsse/signature.py
@@ -204,13 +204,14 @@ def _signature_prepare(envelope, key):
204
# Insert the Signature node in the wsse:Security header.
205
security = get_security_header(envelope)
206
security.insert(0, signature)
207
- security.append(etree.Element(QName(ns.WSU, "Timestamp")))
208
209
# Perform the actual signing.
210
ctx = xmlsec.SignatureContext()
211
ctx.key = key
212
_sign_node(ctx, signature, envelope.find(QName(soap_env, "Body")))
213
- _sign_node(ctx, signature, security.find(QName(ns.WSU, "Timestamp")))
+ timestamp = security.find(QName(ns.WSU, "Timestamp"))
+ if timestamp != None:
214
+ _sign_node(ctx, signature, timestamp)
215
ctx.sign(signature)
216
217
# Place the X509 data inside a WSSE SecurityTokenReference within
0 commit comments