Anonymous User
  Monday, 11 April 2022
  3 Replies
  282 Visits
When using API3 and respective OpenSSL dll's (libcrypt-3-x64.dll & libssl-3-x64.dll) there is a user DEP error when turning on the websocket. There are no issues when running with 1.0 or 1.1.1. The app is a x64 console app.

C++Builder 11.1
OpenSSL 3.0.0
sgcWebSockets 2022.3.0 min indy

Things to note - RAD Installed Indy is completely uninstalled/dereferenced. We do not install packages into the IDE, we directly reference the pas/hpp files.

The following code causes the DEP issue in C++Builder, however the identical code in Delphi does not.

#include "sgcWebSocket.hpp"

int _tmain(int argc, _TCHAR* argv[])
TsgcWebSocketServer *wsserver = new TsgcWebSocketServer(0);

wsserver->SSLOptions->OpenSSL_Options->APIVersion = oslAPI_3_0;
wsserver->SSLOptions->Version = tls1_3;

wsserver->SSL = true;

wsserver->SSLOptions->CertFile = GetCurrentDir() + "\\ssl\\server.cert.pem";
wsserver->SSLOptions->KeyFile = GetCurrentDir() + "\\ssl\\server.cert.pem";
wsserver->SSLOptions->RootCertFile = GetCurrentDir() + "\\ssl\\server.cert.pem";

wsserver->SSLOptions->Port = 443;

wsserver->Active = true;


delete wsserver;


Any advice on how to resolve this would be greatly appreciated!