ELTeleco
ELTeleco

Reputation: 88

Validate the signature of a response from a web service with .net

I want to validate a signature with c# .net, I already have the Key.cert:

Response SOAP

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:ns1="http://www.abcdefg.com/ServicioSub/">
    <SOAP-ENV:Header>
        <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="JHy/t5+j4eRFAP+MVKt9r6V7EDK1LPmMT12OhIQewyhQPWu5Z1A5eMkPD9O0IUZgQqwxId7FmAuGozkplPQbB7DmLnpBra1iwDosDFFUUO11x43wQNu9O1s9xlaxp5AQjSFukoLQzP1bYAmGEjxNLBwv7HfUblXhYf4S4J1AqzJT73EaxJgJpx0TFeICJkUmfaHr8DQMvGhd+C+1jAsUcfuAl/J0Eswt8MPq/LIjhg8gZA8OZu6fP1LJMDAJH+/jU8yIi2WlSq7Qi2R4YsyuDFaQkbSa6fVp8XXF9M3Wof6/Pcw2yeIE8a0Ts8YG5/FcxmgYsyJEA6p1iJikrj/Z6Q==" wsu:Id="b5e7634jc2d428dd4t36e94b9a690037" />
        </SOAP-ENV:Header>
        <SOAP-ENV:Body
            xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="IDke77a718-9fg7-a713-69ef-klb18r337b69">
            <ns1:ResponseCall>
                <date>2023-10-18T12:26:34+02:00</date>
                <result>
                    <codigo>OK</codigo>
                    <descripcion>Correct result</descripcion>
                </result>
                <id_sub>SUG-AA-2023-000421</id_sub>
                <anuncio_1>[DATA]</anuncio_1>
                <anuncio_1>[DATA]</anuncio_1>
                <anuncio_3>[DATA]</anuncio_3>
                <anuncio_4>[DATA]</anuncio_4>
                <estado>PT</estado>
                <url_sub>[DATA]</url_sub>
            </ns1:ResponseCall>
        </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

Please, can someone help me find the solution. Thank you.

Upvotes: 0

Views: 124

Answers (0)

Related Questions