मैं एक वेब सेवा है कि मैं डबल्यूएसडीएल के माध्यम से एक दृश्य स्टूडियो सेवा संदर्भ का उपयोग कर विकसित किया है के लिए एक ग्राहक की है। यह प्रमाणपत्र के साथ अनुरोधों पर हस्ताक्षर करने के लिए कॉन्फ़िगर किया गया है और सेवा ठीक से अनुरोध भेज सकता है, हालांकि सेवा 400 - खराब अनुरोध त्रुटि के साथ जवाब देती है, क्योंकि एक के अलावा अतिरिक्त <Reference>
टैग के साथ अतिरिक्त हस्ताक्षर है, जो कि एचएमएसी-एसएचए 1 का उपयोग इसके हस्ताक्षर विधि के रूप में करता है। एचएमएसी-एसएचए 1 वेब सेवा द्वारा असमर्थित है और इस तरह के अनुरोध को खारिज कर दिया गया है। हालांकि, मैं इस अन्य हस्ताक्षर को भी नहीं चाहता या इसकी आवश्यकता नहीं है, और मुझे यकीन है कि यह कहां से आ रहा है।सोप सेवा के साथ शरीर डबल्यूएसडीएल कॉन्फ़िगर पर हस्ताक्षर उत्पन्न ग्राहक केवल
<customBinding>
<binding name="mainBinding">
<security authenticationMode="MutualCertificate"
allowSerializedSigningTokenOnReply="true"
requireDerivedKeys="false"
requireSignatureConfirmation="false"/>
<httpsTransport />
</binding>
</customBinding>
मैं भी ServiceContractAttribute
के हिस्से के रूप ProtectionLevel = System.Net.Security.ProtectionLevel.Sign
डाल: निम्नलिखित मेरी बाध्यकारी विन्यास है।
मेरी विन्यास का कौन सा हिस्सा दूसरे हस्ताक्षर खड़ी कर रहा है? मैं कॉन्फ़िगरेशन कैसे बदल सकता हूं ताकि मेरे अनुरोध में मेरे पास एक हस्ताक्षर हो?
संपादित करें:
नीचे अनुरोध भेज दिया जाता है कि है। आदेश अवांछनीय हिस्सा उजागर करने के लिए मैं इसे वर्गों में विभाजित है, लेकिन वास्तविकता में यह सब सटा हुआ है। भाग के
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<a:Action s:mustUnderstand="1" u:Id="_1">[removed]</a:Action>
<a:MessageID u:Id="_2">[removed]</a:MessageID>
<a:ReplyTo u:Id="_3">
<a:Address>[removed]</a:Address>
</a:ReplyTo>
<a:To s:mustUnderstand="1" u:Id="_4">[removed]</a:To>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="[removed]">
<u:Created>2017-05-11T08:59:25.681Z</u:Created>
<u:Expires>2017-05-11T09:04:25.681Z</u:Expires>
</u:Timestamp>
<e:EncryptedKey Id="[removed]" xmlns:e="http://www.w3.org/2001/04/xmlenc#">
[removed]
</e:EncryptedKey>
<o:BinarySecurityToken u:Id="[removed]" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3">[removed]</o:BinarySecurityToken>
शुरुआत मैं नहीं चाहता भाग के
<Signature Id="_0" xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/>
<Reference URI="#_1">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>[removed]</DigestValue>
</Reference>
<Reference URI="#_2">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>[removed]</DigestValue>
</Reference>
<Reference URI="#_3">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>[removed]</DigestValue>
</Reference>
<Reference URI="#_4">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>[removed]</DigestValue>
</Reference>
<Reference URI="[removed]">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>[removed]</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>[removed]</SignatureValue>
<KeyInfo>
<o:SecurityTokenReference>
<o:Reference URI="[removed]"/>
</o:SecurityTokenReference>
</KeyInfo>
</Signature>
अंत मैं नहीं चाहता
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<Reference URI="#_0">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>[removed]</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>[removed]</SignatureValue>
<KeyInfo>
<o:SecurityTokenReference>
<o:Reference URI="[removed]"/>
</o:SecurityTokenReference>
</KeyInfo>
</Signature>
</o:Security>
</s:Header>
<s:Body>
[removed]
</s:Body>
</s:Envelope>
संपादित करें 2:
कुछ खोदने और पढ़ने के बाद अब मैं समझता हूं कि दो हस्ताक्षर शरीर और शीर्षलेख के लिए हस्ताक्षर हैं। मैं केवल शरीर प्रस्थान करना चाहते हैं । मैंने तदनुसार शीर्षक बदल दिया है।