[Progress Communities] [Progress OpenEdge ABL] Forum Post: Secure Socket Layer (SSL) failure. error code -54: self signed certificate in certificate c

Status
Not open for further replies.
A

aswanson19

Guest
Hello! I'm having trouble with sending a POST request to the UPS tracking API using the IHttpClient . I get the following error when executing the request in ABL Scratchpad: "Secure Socket Layer (SSL) failure. error code -54: self signed certificate in certificate chain: for 157753a5.0 in C:\Progress\OpenEdge116\certs (9318)" I have tried the solutions from these knowledgebase articles: Progress KB - Getting "error code -54: self-signed certificate" when trying to access a secured Web Service that uses a wildcard certificate Progress KB - error code -54: self signed certificate in certificate chain: for 3c58f906.0 Call to REST API Endpoint Generates Error 9318 (Using OpenEdge.Net.pl) Code Supplied in Body - Forum - OpenEdge Development - Progress Community It appears to be an issue with a missing certificate. I tried downloading the root certificate and importing it with the "mkhashfile" command, but nothing has solved this error. None of the certificates I've imported have had the same name as the one in the error message (157753a5.0). I suspect it is looking for a certificate file with that name but can't find it. I was able to send a POST request like this to XPO's API without issue. Here is my code: USING Progress.Lang.* FROM PROPATH. USING Progress.Json.ObjectModel.* FROM PROPATH. USING Spark.Core.Service.DynamicEntity FROM PROPATH. USING Spark.Core.Util.ApplicationError FROM PROPATH. USING OpenEdge.Core.String. USING OpenEdge.Net.HTTP.ClientBuilder. USING OpenEdge.Net.HTTP.Credentials. USING OpenEdge.Net.HTTP.IHttpClient. USING OpenEdge.Net.HTTP.IHttpRequest. USING OpenEdge.Net.HTTP.RequestBuilder. USING OpenEdge.Net.URI. USING OpenEdge.Net.HTTP.IHttpResponse. USING Progress.Json.ObjectModel.JsonObject. DEFINE VARIABLE oHttpRequest AS IHttpRequest NO-UNDO. DEFINE VARIABLE oResponse AS IHttpResponse NO-UNDO. DEFINE VARIABLE oUri AS URI NO-UNDO. DEFINE VARIABLE oClient AS IHttpClient NO-UNDO. DEFINE VARIABLE oJsonEntity AS JsonObject NO-UNDO. DEFINE VARIABLE oJsonBody AS JsonObject NO-UNDO. oJsonEntity = NEW JsonObject(). oJsonBody = NEW JsonObject(). oClient = ClientBuilder:Build():Client. oUri = NEW URI('https', 'upsfreight.com'). oUri:path = '/shipping/Tracking/Index.aspx'. // Build JSON body // Code for building the POST request JSON body goes here oJsonBody:Add("Username", "exampleuser"). ... // Send request oHttpRequest = RequestBuilder :post(oUri, oJsonBody) :ContentType('application/json') :AcceptJson() :Request. oResponse = oClient:Execute(oHttpRequest). IF TYPE-OF(oResponse:Entity, JsonObject) THEN ASSIGN oJsonEntity = CAST(oResponse:Entity, JsonObject). Any help is appreciated. Thanks!

Continue reading...
 
Status
Not open for further replies.
Top