AppServer failing to connect over https | Remote server is using wildcard certificate.

JamesBowen

19+ years progress programming and still learning.
I'm trying to connect to a remote PASOE AppServer over HTTPS. The Sever certificate is signed by a trusted CA Provider. The Servers public certificate is using a wild card certificate. The hostname exist in the SAN of the Server Certificate.

I'm getting the following error when.

1751763070745.png



If include :ServerNameIndicator("api.domainname.com") this helps resolve the issue if I was doing a direct connect via HTTP client, but I'm trying to this via an AppSever connection.

Code:
USING OpenEdge.Net.HTTP.RequestBuilder.
USING openedge.net.http.IHttpRequest.
USING openedge.net.http.IHttpResponse.
USING Progress.Json.ObjectModel.*.
USING OpenEdge.Net.HTTP.ClientBuilder.
USING OpenEdge.Net.HTTP.ResponseBuilder.
USING OpenEdge.Net.HTTP.IHttpClientLibrary.
USING OpenEdge.Net.HTTP.Lib.ClientLibraryBuilder.
USING OpenEdge.Net.HTTP.Credentials.
USING OpenEdge.Net.HTTP.IHttpClient.

DEFINE VARIABLE cMessage AS CHARACTER NO-UNDO.
DEFINE VARIABLE cUrl AS CHARACTER NO-UNDO.

DEFINE VARIABLE lStatus AS LOGICAL NO-UNDO.

DEFINE VARIABLE oCredentials AS Credentials NO-UNDO.
DEFINE VARIABLE oPayload AS JsonObject NO-UNDO.
DEFINE VARIABLE oParser AS ObjectModelParser NO-UNDO.
DEFINE VARIABLE oEntity AS JsonObject NO-UNDO.
DEFINE VARIABLE oRequest AS IHttpRequest NO-UNDO.
DEFINE VARIABLE oResponse AS IHttpResponse NO-UNDO.
DEFINE VARIABLE oLib AS IHttpClientLibrary NO-UNDO.
DEF VAR oClient AS IHttpClient NO-UNDO.

cUrl = "https://api.domainname.com:2053".
oRequest = RequestBuilder:Get(cUrl)
:ContentType("application/json")

:Request.

oResponse = ResponseBuilder:Build():Response.

oLib = ClientLibraryBuilder:Build()
:ServerNameIndicator("api.domainname.com")    // <--- THE SOLTUTION!
 :sslVerifyHost(NO):Library.

ClientBuilder:Build()
:UsingLibrary(oLib)
:Client:Execute(oRequest,oResponse).

DISP oResponse:StatusCode.


How do I include the equivalent ServerNameIndicator("api.domainname.com") in an AppServer connection?
App Server Connect code:

Code:
CREATE SERVER hnAppServer.



hnAppServer:CONNECT ('-URL https://api.somedoamin.com:2053/apsv/ -nohostverify').



IF NOT hnAppServer:CONNECTED () THEN

    MESSAGE "AppServer not connected"

        VIEW-AS ALERT-BOX ERROR.
 
Was going to ask if that existed. The server connect method usually gets these things before the client socket for some reason, so knowing that it's in the HTTP client typically means it's the in the other clients. YMMV, ceteris paribus, etc
 
Back
Top