Http Request using SSL and proxy authentication

Primary tabs

Deployment, Caché

Hi,

I am trying to use the %Net.HttpRequest Class, and the request has to pass through a proxy server that requires authentication.

I am usually able to do that by using the following code:

S httprequest.ProxyServer=proxyServer
S httprequest.ProxyPort=proxyPort
S httprequest.ProxyAuthorization="Basic xyzxyzxyz"
 

I have a problem accessing a site that is accessible only using SSL-

The combination of the proxy authentication code and the SSL code-

S httprequest.Https=1
S httprequest.SSLConfiguration = "XYZ"
S httprequest.ProxyHTTPS=1
 

Does not work- I get the following error:

"<WRITE>zSend+180^%Net.HttpRequest"

If I set the ProxtTunnel property to 1, I get a different error-

Unable to write to socket with SSL/TLS configuration 'TEST', error reported 'SSL/TLS error in SSL_connect(), SSL_ERROR_SSL: protocol error, error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure'

Any advice?

If I simply open a browser on the server and navigate to the site, there is no problem,

So there should be a way to access it with the HttpRequest class (I hope..)

The URL is a public one- https://www.currency-iso.org/dam/downloads/lists/list_one.xml

 

Regards,

Nael

 

Replies

Did you create a SSL config in the management portal?

If you leave everything default in the config and set httprequest.SSLConfiguration
 to whatever your config is called it should work.

This config has worked for me.

Thanks,

I have another server, that is not in the network with the proxy I mentioned, and it does work with default settings as you said.

The problem is only when I must go through the proxy.

It's possible that the HttpRequest class is unable to handle this situation, but I am hoping that this is not the case.