Gerald Moull
MyDocz Ltd
Christchurch, NZ
03 342 5550
gerald@mydocz.com

Utilities

mdzWebRequest

Alternative to httpWebRequest allowing modern ciphers on versions of Windows Server prior to 2022.

A site I manage integrates to a 3rd Party that updated their SSL connectivity and in doing so restricted the number of allowable ciphers for clients to connect with to 3 (for TLS 1.2). They are as follows:

TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256

The managed site operates in a .Net environment and its httpWebRequest classes use the underlying operating system's https commmunication facilities. The 3 ciphers were not supported on anything other than Windows Server 2022 and we were not in a position to migrate to this platform.

I therefore investigated placing another server in our network to operate as a 'proxy' for our calls. The 3rd party uses Linux and PHP, so this was a natural choice.

However, we have PHP installed on our Windows Servers, so investigated if curl within PHP would use these ciphers in a Windows environment.

They did indeed make use of these ciphers, so I have put together a mdzWebRequest package of PHP proxy and .Net class to wrap the .Net httpWebRequest class to optionally make use of the proxy.

A testing/demonstration page can be viewed at http://www.mydocz.com/mdzWebRequest_Test.aspx.

This test allows the properties of the a mdzWebRequest object to be set and the resource envoked. There are also a number of preconfigured tests demonstrating mdzWebRequest handling Text, JSON, XML, Image and HTML data.

For security reasons, the object can not call the resource directly, instead it is coded to always use the mdzWebRequest Proxy which is held on its own domain that only allows access from the MyDocz network (ie the mdzWebRequest Test) and only allow 2 requests per 10 seconds across all users.

Documentation and source for mdzWebRequest can be viewed at https://github.com/GrumpyGel/mdzWebRequest.

Contact

Gerald Moull
MyDocz Ltd
Christchurch, NZ
03 342 5550
gerald@mydocz.com