Tuesday, 19 January 2021
  2 Replies
  1K Visits
  Subscribe
Hi,

I'm using C++ Builder 10.2 and WebSockets 4.4.4 Enterprise. I have a password encrypted key-file for my SSL certificate so I always got an exception "could not load key. check password". After long search I found out I had to enable this compiler define:


// IdCompilerDefines.inc
{$DEFINE SGC_OPENSSL_API_1_1} // sgc--> enable this if your certificate require password (SSL_CTX is different between openssl 1.0 and 1.1)


After enabling, it worked.

Now I wanted to upgrade to 4.4.6 and after enabling again this define, the package cannot be build anymore.

"EVP_MD_CTX_Create is not a declared identifier"

After going back to 4.4.4 everything was fine again.

So my questions:
- Am I doing something wrong or is it a bug?
[s]- I would recommend to add this to the manual, maybe useful for someone else[/s]
- If I change to a certificate without password, do I have to recompile websockets with disabling this flag again?
What if I do not know if the server will be used with an password or not?

Regards,

Michael