Gukkifar has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to access a .NET service, using WS-Secureconversation. Specifically, WS-Trust for TLS handshake:
http://schemas.xmlsoap.org/ws/2005/02/trust/tls/WSTrustForTLS.pdf
It would be much easier if the service was located on a https endpoint.
All cpan modules I could find revolves around a socket and an endpoint that is ready to talk ssl, but that is not the case here. I need to wrap the TLS handshake and eventually application data in XML.
I've got the connection and XML under control, but need help with the contents of "BinaryExchange". A lot of modules already solved this, but they all require to take care of the tcp connection as well.
Can anyone help me to craft the TLS handshakes and encrypted application data, so I can wrap it in xml?
This is an example of the initial post that should be made from the client:
POST http://obfuscated.svc HTTP/1.1 Content-Type: application/soap+xml; charset=utf-8 Host: obfuscated Content-Length: 1190 Expect: 100-continue Accept-Encoding: gzip, deflate Connection: Keep-Alive <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a= +"http://www.w3.org/2005/08/addressing"><s:Header><a:Action s:mustUnde +rstand="1">http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</a:A +ction><a:MessageID>urn:uuid:196ed237-3216-4b52-9304-beb62db9e103</a:M +essageID><a:ReplyTo><a:Address>http://www.w3.org/2005/08/addressing/a +nonymous</a:Address></a:ReplyTo><a:To s:mustUnderstand="1">http://obf +uscated.svc</a:To></s:Header><s:Body><t:RequestSecurityToken Context= +"uuid-e119489f-65ec-4609-9757-a284d3b0b5b3-1" xmlns:t="http://schemas +.xmlsoap.org/ws/2005/02/trust"><t:TokenType>http://schemas.xmlsoap.or +g/ws/2005/02/sc/sct</t:TokenType><t:RequestType>http://schemas.xmlsoa +p.org/ws/2005/02/trust/Issue</t:RequestType><t:KeySize>256</t:KeySize +><t:BinaryExchange ValueType=" http://schemas.xmlsoap.org/ws/2005/02/ +trust/tlsnego" EncodingType="http://docs.oasis-open.org/wss/2004/01/o +asis-200401-wss-soap-message-security-1.0#Base64Binary">FgMBAF4BAABaA +wFWHMqB2vOzZbm0ZHugS6WeW0uxqr6F89tcHCzaEzVutgAAGMAUwBMANQAvwArACQA4AD +IACgATAAUABAEAABkACgAGAAQAFwAYAAsAAgEAACMAAP8BAAEA</t:BinaryExchange> +</t:RequestSecurityToken></s:Body></s:Envelope>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Embed TLS in plaintext XML
by noxxi (Pilgrim) on Nov 11, 2015 at 16:05 UTC | |
by Gukkifar (Initiate) on Nov 11, 2015 at 20:42 UTC | |
by noxxi (Pilgrim) on Nov 12, 2015 at 06:05 UTC |