Question
Rochdi Badis · Sep 15

HTTP failing to connect

Hi Guys,

I'm using the below code that should get me a JSON response, here an example of what I get if I run it from the browser:


Set Httprequest=##class(%Net.HttpRequest).%New()
Set Httprequest.SSLConfiguration="RTLS"
Set Httprequest.Server="nn.sxhub.com"
Set Httprequest.Timeout=30
 Set Httprequest.Port=9222
Set Httprequest.Https=1
set Httprequest.ContentType="application/json"
Do Httprequest.SetHeader("Accept","application/json")
Do Httprequest.SetHeader("Accept-Language","en_US")
Set HttpURL="/SX/api/visiblebles?mac=CC:1A:E2:E1:A4:30"
Set tSc=Httprequest.Get(HttpURL)
If $$$ISERR(tSc){
!, $System.OBJ.DisplayError(),!
}Else{ Set response=Httprequest.HttpResponse
    !,"Response : ",Httprequest.HttpResponse.Data.Read(Httprequest.HttpResponse.Data.Size)

  }

 

but this is the error I get when running it from the above code

ERROR #6085: Unable to write to socket with SSL/TLS configuration 'RTLS', 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'1

 

 

Thanks

Product version: Caché 2014.1
0
0 87
Discussion (3)2
Log in or sign up to continue

Based on this error: SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure , you probably want to enable SSLv3 on your SSLConfig. It's showing as disabled in your screenshot