Reputation: 11
I am trying to use OpenEdge.Net.pl for making a call over https, and I am getting the next error message:
Secure Socket Layer (SSL) failure. Error code 17424: SSL routines (9318)
I've been reading for a while and the problem I'm having has to do with the fact that the URL I'm pointing to has multiple subdomains like:
api.exampleurl.com, dev.exampleurl.com...
From what I've seen and tested, with the 'ServerNameIndicator' parameter from the ClientLibraryBuilder class I could workaround this problem. In fact, in my local installation with version 12+ works. The problem is that in the server where I need to implement this functionallity the installed version is the 11.7.4 and from what I've seen, although the documentation says it was implemented in the 11.3+ version, this parameter didn't exist in that version since when checking my code it warns me with the next message:
Could not locate element 'ServerNameIndicator' in class 'OpenEdge.Net.HTTP.Lib.ClientLibraryBuilder'. (12927)
I've also tried adding the sslVerifyHost(FALSE) parameter but it doesn't seem to be doing anything at all.
USING Progress.Json.ObjectModel.*.
USING OpenEdge.Net.HTTP.*.
USING OpenEdge.Net.HTTP.Lib.*.
USING OpenEdge.Net.URI.
DEFINE VARIABLE oPayload AS JsonObject NO-UNDO.
DEFINE VARIABLE oURI AS URI NO-UNDO.
DEFINE VARIABLE oRequest AS IHttpRequest NO-UNDO.
DEFINE VARIABLE oLib AS IHttpClientLibrary NO-UNDO.
DEFINE VARIABLE oClient AS IHttpClient NO-UNDO.
DEFINE VARIABLE oResponse AS IHttpResponse NO-UNDO.
oURI = NEW URI( 'https', 'api.exampleurl.com' ).
oURI:Path = '/custom/path'.
oPayload = NEW JsonObject().
oPayload:Add("data","example data").
oRequest = RequestBuilder:POST(oURI, oPayLoad):Request.
oLib = ClientLibraryBuilder:Build()
:sslVerifyHost(NO)
:ServerNameIndicator('api.exampleurl.com')
:LIBRARY.
oClient = ClientBuilder:Build()
:UsingLibrary( oLib )
:Client.
oResponse = oClient:Execute( oRequest ).
How can I bypass this error? Is there any other way to perform a request to an URL without having this problem?
Thanks in advance.
Upvotes: 1
Views: 258
Reputation: 3909
There's an answer for this at https://community.progress.com/s/question/0D5Pb00001FvXqwKAF/problems-with-ssl-when-performing-http-request .
TL;DR is that you should make sure that you have the corect version of the OpenEdge.Net.pl file installed.
Upvotes: 0