OpenEdge 11.6 uses TLSv1.2 as the default encryption protocol to conform to the current industry standards. When connecting using ABL sockets to a server which uses the older standards (i.e. SSLv3, TLSv1 or TLSv1.1) you need to use the -sslciphers and -sslprotocols options in your ABL CONNECT method.
The following sample code shows how to do this and works properly for connecting to SkipJack's development server (please note that this is accurate as of November 6, 2015 where their development server only supported TLSv1 connections, this will most likely change in the future):
DEFINE VARIABLE hSocket AS HANDLE NO-UNDO. DEFINE VARIABLE cPort AS CHARACTER NO-UNDO INITIAL "443". DEFINE VARIABLE lStatus AS LOGICAL NO-UNDO. DEFINE VARIABLE cSocketString AS CHARACTER NO-UNDO. DEFINE VARIABLE cHost AS CHARACTER NO-UNDO INITIAL "developer.skipjackic.com". DEFINE VARIABLE cProtocols AS CHARACTER NO-UNDO INITIAL "TLSv1". DEFINE VARIABLE cCiphers AS CHARACTER NO-UNDO INITIAL "AES128-SHA,RC4-SHA,DES-CBC3-SHA,DES-CBC-SHA,EXP-DES-CBC-SHA,EXP-RC4-MD5".
ASSIGN cSocketString = "-H " + cHost + " -S " + cPort + " -ssl -sslprotocols " + cProtocols + " -sslciphers " + cCiphers.
CREATE SOCKET hSocket. ASSIGN lStatus = hSocket:CONNECT(cSocketString) NO-ERROR.
IF lStatus THEN MESSAGE "Socket connection OK!" VIEW-AS ALERT-BOX. ELSE MESSAGE "Socket connection FAILED!" SKIP ERROR-STATUS:GET-MESSAGE(1) VIEW-AS ALERT-BOX.
hSocket:DISCONNECT() NO-ERROR.
DELETE OBJECT hSocket. |