Openedge server connect SSL issue...

Posted by MBeynon on 29-Oct-2015 10:33

Hi,

I have a simple piece of code that users a server handle to retrieve a WSDL using https:

DEFINE VARIABLE hWebService            AS HANDLE    NO-UNDO.
DEFINE VARIABLE lvlWSReturn            AS LOGICAL   NO-UNDO.
DEFINE VARIABLE lvcWSConnectionString  AS CHARACTER NO-UNDO.
DEF VAR lviProMsgs AS INT NO-UNDO.
DEF VAR opcError AS CHAR  NO-UNDO.

lvcWSConnectionString = "-WSDL 'https://<url>webservice.asmx?WSDL'".

CREATE SERVER hWebService.

lvlWSReturn  = hWebService:CONNECT( lvcWSConnectionString ) NO-ERROR.

IF lvlWSReturn = NO
  OR ERROR-STATUS:ERROR THEN  
DO:

  DO lviProMsgs = 1 TO ERROR-STATUS:NUM-MESSAGES:                                                   
    opcError = opcError + SUBSTITUTE (" Error #&1 [&2] " ,
      STRING(lviProMsgs), STRING(ERROR-STATUS:GET-MESSAGE(lviProMsgs)) ,"/" ).
  END.
 
END.

MESSAGE opcError VIEW-AS ALERT-BOX.

IF hWebService:CONNECTED () THEN
  hWebService:DISCONNECT().

IF VALID-HANDLE(hWebService) THEN
  DELETE OBJECT hWebService.

 

However, I get back the following error:

---------------------------
Message (Press HELP to view stack trace)
---------------------------
Error #1 [Secure Socket Layer (SSL) failure. error code -54:  unable to get local issuer certificate: for 3c189833.0 in C:\OE102B\certs (9318)]
Error #2 [Connection failure for host <url> port 443 transport HTTPS. (9407)]
Error #3 [Error loading WSDL document  https://<url>webservice.asmx?WSDL : Fatal Error: connect operation failed (WinSock reported error=0) (11748)]
---------------------------
OK   Help   
---------------------------

I've been to the https URL and imported the certificate as advised in the knowledgebase article: http://knowledgebase.progress.com/articles/Article/P121624

but I still keep getting this error.


I've checked the OE certs folder and 3c189833.0 is definately not there.

Not sure what to do next. Is the supplied certificate invalid? What is 3c189833.0?

Any help would be greatlly appreciated,

Thanks,

Mark.

P.S> I should add I'm using OE10.2A.05

All Replies

Posted by Brian K. Maher on 29-Oct-2015 10:57

Mark,
 
If you have followed the steps in the KB article and you do not end up with the .0 file noted in the error then there are other certificates that are still needed.  Check with the vendor of the web service and ask them for all of the certificates that are needed.
 
Brian

Posted by MBeynon on 30-Oct-2015 04:38

Thanks Brian,

Yes, you are right. I was missing a required cert. Once I had this, it all worked fine!

Mark.

Posted by Brian K. Maher on 30-Oct-2015 05:00

Mark,

Glad to hear that you got things working.  

This thread is closed