synopse / mORMot2

OpenSource RESTful ORM/SOA/MVC Framework for Delphi and FreePascal
https://synopse.info
Other
531 stars 132 forks source link

mget and OPENSSL in Windows #301

Closed zen010101 closed 1 month ago

zen010101 commented 1 month ago

There is a piece of code at the beginning of mget:

// initialize OpenSSL if needed
{$ifdef USE_OPENSSL}
OpenSslInitialize;
{$endif USE_OPENSSL}

There is a missing sentence NewNetTls := @NewOpenSslNetTls;, otherwise OpenSSL will not be actually loaded and executed. I think the correct version should be like this:

// initialize OpenSSL if needed
{$ifdef USE_OPENSSL}
OpenSslInitialize;
NewNetTls := @NewOpenSslNetTls;
{$endif USE_OPENSSL}
synopse commented 1 month ago

Please use the forum for such discussion.

Which OS are you using?

On Windows, you need to define the FORCE_OPENSSL conditional in your project. On POSIX, NewNetTls is already set.