Secure Socket layer(SSL) failure, error code 10060 : unknown

Posted by singh.mitesh@gmail.com on 08-Nov-2018 20:50

Hello , 

I am trying to connect to a rest web service through below code . I am using OpenEdge 7.1 .

oClient = ClientBuilder:Build():KeepCookies():Client. /*CookiesJarBuilder:Build():CookieJar*/

oURI = NEW URI('https', 'hostname', port).
oURI:Path = '/api/sample/uri'.

oRequest = RequestBuilder:Build('POST', oURI):AddHeader("Content-Type","application/json")
:acceptJson()
:Request.
oResponse = ResponseBuilder:Build():Response.

oResponse = ClientBuilder:Build():Client:Execute(oRequest).

When i execute the code ,  i get below two errors . 

Error 1 :  

Secure Socket layer faliure . error code -54: self signed certificate chain: for xyzcertificate in c:\Progress\OpenEdge\certs(9318) . 

Error 2:

Secure Socket layer (SSL) failure . error code 10060: Unknown network error (9318) .

Could anybody please suggest 

Thanks! 

All Replies

Posted by Brian K. Maher on 08-Nov-2018 20:56

Look into the NoHostVerify method in the HTTPClient.  You need to set it to true.
 
 
Brian Maher
Principal Engineer, Technical Support
Progress
Progress
14 Oak Park | Bedford, MA 01730 | USA
phone
+1 781 280 3075
 
 
Twitter
Facebook
LinkedIn
Google+
 
 

Posted by v205 on 08-Nov-2018 21:36

Mitesh, this might help you:

community.progress.com/.../55829

Posted by singh.mitesh@gmail.com on 09-Nov-2018 19:16

I am still not able to connect to the web service .  

I have added -nohostverify , re installed all the certificates but it still does not work . To identify the issue . I am now just trying to connect to the server using connect statement as shown below in the code and i am getting error

"Secure Socket layer(SSL) failure, error code 10061 : unknown network error (9318)"

/*********** Below code which i am running to ***************/

DEFINE VARIABLE vcWebResp    AS CHARACTER        NO-UNDO.

DEFINE VARIABLE lSucess      AS LOGICAL          NO-UNDO.

DEFINE VARIABLE mResponse    AS MEMPTR           NO-UNDO.

DEFINE VARIABLE mRequest       AS MEMPTR.

DEFINE VARIABLE postUrl AS CHAR.

DEFINE VARIABLE vcRequest as char format "x(100)" no-undo.

DEFINE VARIABLE postData  as char format "x(100)" no-undo.

DEFINE VARIABLE vhSocket   AS HANDLE                                NO-UNDO.

CREATE SOCKET vhSocket.

/**********Using Windows API****************/

PROCEDURE Sleep EXTERNAL "KERNEL32.DLL":

DEFINE INPUT PARAMETER intMilliseconds AS LONG.

END PROCEDURE.

vhSocket:CONNECT("-h hostname -S 1234 -ssl -nohostverify") NO-ERROR.

IF vhSocket:CONNECTED() = FALSE THEN

do:

 message "Error".

 MESSAGE ERROR-STATUS:GET-MESSAGE(1) VIEW-AS ALERT-BOX.

end.

else

 message "Connected".

pause.

Posted by Brian K. Maher on 09-Nov-2018 19:28

What is the actual value for ‘hostname’?  Surely that isn’t the actual name.
 
 
Brian Maher
Principal Engineer, Technical Support
Progress
Progress
14 Oak Park | Bedford, MA 01730 | USA
phone
+1 781 280 3075
 
 
Twitter
Facebook
LinkedIn
Google+
 
 

Posted by singh.mitesh@gmail.com on 09-Nov-2018 19:40

host name is cs3.gtreasurycs.com , i was not providing the hostname and port number as that information might be sensitive .

Posted by Brian K. Maher on 09-Nov-2018 19:57

I recommend that you first search our knowledgebase.  You can do it with google as follows:

site:progress.com your search string goes here, the full text of the error is a good starting point

Searching for "Secure Socket layer(SSL) failure, error code 10061 : unknown network error (9318)" returned this...

knowledgebase.progress.com/.../000031248

Check with your IT folks and see if they require the use of a proxy for internet bound requests.  I would expect so.

This thread is closed