Note that there are some explanatory texts on larger screens.

plurals
  1. POTimestamp must be signed error in response
    primarykey
    data
    text
    <p>For starters, I know you'd think this is a duplicate but if you read them you'll notice that some people say that deleting the timestamp will fix it and others tell otherwise.</p> <p>I'm trying to connect to a Java SOAP Webservice with certificates by using <strong>.Net 3.5</strong> but when I receive the response it throws an error : <strong>"The security header element 'Timestamp' with the 'Timestamp-984' id must be signed."</strong></p> <pre><code>var b = new CustomBinding(); b.Name = "AVbinding"; b.CloseTimeout = new TimeSpan(0, 1, 0); b.OpenTimeout = new TimeSpan(0, 1, 0); b.ReceiveTimeout = new TimeSpan(0, 10, 0); b.SendTimeout = new TimeSpan(0, 1, 0); AsymmetricSecurityBindingElement security = new AsymmetricSecurityBindingElement(); security.IncludeTimestamp = true; security.MessageSecurityVersion = MessageSecurityVersion.WSSecurity11WSTrust13WSSecureConversation13WSSecurityPolicy12; security.RecipientTokenParameters = new X509SecurityTokenParameters(X509KeyIdentifierClauseType.Any, SecurityTokenInclusionMode.AlwaysToInitiator); security.InitiatorTokenParameters = new X509SecurityTokenParameters(X509KeyIdentifierClauseType.Any, SecurityTokenInclusionMode.AlwaysToRecipient); security.SecurityHeaderLayout = SecurityHeaderLayout.Lax; security.DefaultAlgorithmSuite = System.ServiceModel.Security.SecurityAlgorithmSuite.Basic256Sha256Rsa15; security.AllowSerializedSigningTokenOnReply = true; security.AllowInsecureTransport = true; security.EnableUnsecuredResponse = true; security.RequireSignatureConfirmation = true; security.SecurityHeaderLayout = SecurityHeaderLayout.Lax; ExtensionElement extensionElement = new ExtensionElement(); b.Elements.Add(security); b.Elements.Add(new TextMessageEncodingBindingElement(MessageVersion.Soap11, Encoding.UTF8)); HttpsTransportBindingElement httpsBinding = new HttpsTransportBindingElement(); b.Elements.Add(httpsBinding); string certMapPath = Server.MapPath("~/App_Data"); X509Certificate2 cert = new X509Certificate2(certMapPath + "\\_CERTNAME_", "X"); X509Certificate2 serCert = new X509Certificate2(certMapPath + "\\_CERTNAME2_.cer"); AsymmetricAlgorithm key = new System.Security.Cryptography.RSACryptoServiceProvider(); key.FromXmlString("_KEY_"); cert.PrivateKey = key; client.Endpoint.Contract.ProtectionLevel = System.Net.Security.ProtectionLevel.Sign; </code></pre> <p>Question is, what do I have to do?</p> <p>My request : </p> <pre><code>&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"&gt; &lt;s:Header&gt; &lt;ActivityId CorrelationId="7d9e44cb-cecd-4c49-9a71-79a2ad04a2ec" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics"&gt;63bde0b8-8953-41b8-b5c2-a69c712346b6&lt;/ActivityId&gt; &lt;VsDebuggerCausalityData xmlns="http://schemas.microsoft.com/vstudio/diagnostics/servicemodelsink"&gt;uIDPo3dbGZWnrwhDouJE+VgKu4MAAAAAzmpHur/flUSUy0rxOVAJ8Nk4GsFjc6xOg46yQ3o0ZMQACQAA&lt;/VsDebuggerCausalityData&gt; &lt;o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"&gt; &lt;o:BinarySecurityToken&gt; &lt;!-- Removed--&gt; &lt;/o:BinarySecurityToken&gt; &lt;Signature xmlns="http://www.w3.org/2000/09/xmldsig#"&gt; &lt;SignedInfo&gt; &lt;CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"&gt;&lt;/CanonicalizationMethod&gt; &lt;SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"&gt;&lt;/SignatureMethod&gt; &lt;Reference URI="#_2"&gt; &lt;Transforms&gt; &lt;Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"&gt;&lt;/Transform&gt; &lt;/Transforms&gt; &lt;DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"&gt;&lt;/DigestMethod&gt; &lt;DigestValue&gt;Z4OHoIS/bVCWIROLBFcxjfJuXv0ebA/SO8WQWuPTrQo=&lt;/DigestValue&gt; &lt;/Reference&gt; &lt;Reference URI="#uuid-f52585e9-3358-46f6-8e9f-9a16b5c0f29b-1"&gt; &lt;Transforms&gt; &lt;Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"&gt;&lt;/Transform&gt; &lt;/Transforms&gt; &lt;DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"&gt;&lt;/DigestMethod&gt; &lt;DigestValue&gt;Pnp4gaKUnboMFE2LgLdsFzPBL+7fHqXacVg/MR7AS6c=&lt;/DigestValue&gt; &lt;/Reference&gt; &lt;/SignedInfo&gt; &lt;SignatureValue&gt;NSE/peVOxXheXOqyNT1qx7uZPOhSms35fmJxlf4lBuODD9tz8/TCwzmAAdDArGwc6VJmdw1jVX5tNchYvAqignsPRgTwB+tSbMvUZ6UMwOgHZWRh8rXjYw34EhdEWWBzg0U1ves6ynY88vJW0oFyWiiFcNGkEuy140X7h/Ev+3I=&lt;/SignatureValue&gt; &lt;KeyInfo&gt; &lt;o:SecurityTokenReference&gt; &lt;o:Reference URI="#uuid-da5ccb9b-2c40-4ede-9079-c94abf912843-2"&gt;&lt;/o:Reference&gt; &lt;/o:SecurityTokenReference&gt; &lt;/KeyInfo&gt; &lt;/Signature&gt; &lt;u:Timestamp u:Id="uuid-f52585e9-3358-46f6-8e9f-9a16b5c0f29b-1"&gt; &lt;u:Created&gt;2013-03-04T09:27:15.087Z&lt;/u:Created&gt; &lt;u:Expires&gt;2013-03-04T09:32:15.087Z&lt;/u:Expires&gt; &lt;/u:Timestamp&gt; &lt;/o:Security&gt; &lt;/s:Header&gt; &lt;s:Body u:Id="_2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; &lt;getAvailabilityRequest xmlns="_url_"&gt; &lt;userID xmlns=""&gt;_UserID_&lt;/userID&gt; &lt;password xmlns=""&gt;_pass_&lt;/password&gt; &lt;requestID xmlns=""&gt;_request_&lt;/requestID&gt; &lt;SystemIdentifier xmlns=""&gt;?&lt;/SystemIdentifier&gt; &lt;/getAvailabilityRequest&gt; &lt;/s:Body&gt; &lt;/s:Envelope&gt; </code></pre> <p>Response : </p> <pre><code>&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"&gt; &lt;SOAP-ENV:Header&gt; &lt;wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" SOAP-ENV:mustUnderstand="1"&gt; &lt;wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-932"&gt; &lt;wsu:Created&gt;2013-03-04T09:27:24.013Z&lt;/wsu:Created&gt; &lt;wsu:Expires&gt;2013-03-04T09:32:24.013Z&lt;/wsu:Expires&gt; &lt;/wsu:Timestamp&gt; &lt;wsse:BinarySecurityToken&gt; &lt;!-- Removed--&gt; &lt;/wsse:BinarySecurityToken&gt; &lt;ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="Signature-930"&gt; &lt;ds:SignedInfo&gt; &lt;ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"&gt;&lt;/ds:CanonicalizationMethod&gt; &lt;ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"&gt;&lt;/ds:SignatureMethod&gt; &lt;ds:Reference URI="#id-931"&gt; &lt;ds:Transforms&gt; &lt;ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"&gt;&lt;/ds:Transform&gt; &lt;/ds:Transforms&gt; &lt;ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"&gt;&lt;/ds:DigestMethod&gt; &lt;ds:DigestValue&gt;+/NJN562AUh5U5T4VXGRbdU28+JLmW2bdHg1gLf/SWg=&lt;/ds:DigestValue&gt; &lt;/ds:Reference&gt; &lt;ds:Reference URI="#SigConf-929"&gt; &lt;ds:Transforms&gt; &lt;ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"&gt;&lt;/ds:Transform&gt; &lt;/ds:Transforms&gt; &lt;ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"&gt;&lt;/ds:DigestMethod&gt; &lt;ds:DigestValue&gt;uzljMoX3dAm90+8P10b2/xE5OooNeP81NDtlefCBoc8=&lt;/ds:DigestValue&gt; &lt;/ds:Reference&gt; &lt;/ds:SignedInfo&gt; &lt;ds:SignatureValue&gt;Fixb+0TnwQ2KfLqywusmwcKF8OvoBP/bLqIKfLadyV1U97+NZKzcMrSJjSD0a0sDhJZ+lo/KoHVE KBY12ZZDP9xE+k9LHAlWZIq3a2gvBkTFR3p5NcYFQM4cbA/x/bvpEqDyzqYSoXnXMOG46DFn5klo DO0PJkMiXKvLBhrCpZtM26AovD5WQlD694EeIXt4jey15zvGzKz88eNfHqNiYa1Wu2HuOTcnSJRv hQKHmJKpDzn9+ZSohsULVR5xtGFQD7GWL6LLFEMqthD2a10KMan43Qd62SMUcB64o+l/M+l89+Oo AbE0S2GXP3vvSa3ZoGduktWlyNlC7Qz/Iww0Qg== &lt;/ds:SignatureValue&gt; &lt;ds:KeyInfo Id="KeyId-83F04DBB53B92E8E1F1362389243499698"&gt; &lt;wsse:SecurityTokenReference xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="STRId-83F04DBB53B92E8E1F1362389243499699" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"&gt; &lt;wsse:Reference URI="#CertId-83F04DBB53B92E8E1F1362389243499697" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"&gt;&lt;/wsse:Reference&gt; &lt;/wsse:SecurityTokenReference&gt; &lt;/ds:KeyInfo&gt; &lt;/ds:Signature&gt; &lt;wsse11:SignatureConfirmation xmlns:wsse11="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" Value="NSE/peVOxXheXOqyNT1qx7uZPOhSms35fmJxlf4lBuODD9tz8/TCwzmAAdDArGwc6VJmdw1jVX5tNchYvAqignsPRgTwB+tSbMvUZ6UMwOgHZWRh8rXjYw34EhdEWWBzg0U1ves6ynY88vJW0oFyWiiFcNGkEuy140X7h/Ev+3I=" wsu:Id="SigConf-929"&gt;&lt;/wsse11:SignatureConfirmation&gt; &lt;/wsse:Security&gt; &lt;/SOAP-ENV:Header&gt; &lt;SOAP-ENV:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="id-931"&gt; &lt;ns3:getAvailabilityResponse xmlns:ns3="_URL_" xmlns=""&gt; &lt;RequestID&gt;_requestID_&lt;/RequestID&gt; &lt;Status&gt;Available&lt;/Status&gt; &lt;Version&gt;1.32.0&lt;/Version&gt; &lt;/ns3:getAvailabilityResponse&gt; &lt;/SOAP-ENV:Body&gt; &lt;/SOAP-ENV:Envelope&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload