Enable hostname verification in OpenSSL (bug #75 by dokkie8844)

git-svn-id: https://svn.code.sf.net/p/synalist/code/trunk@274 7c85be65-684b-0410-a082-b2ed4fbef004
This commit is contained in:
geby
2023-11-07 10:37:28 +00:00
parent 5e5b55ea12
commit c529150b61
6 changed files with 60 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
{==============================================================================|
| Project : Ararat Synapse | 002.000.000 |
| Project : Ararat Synapse | 002.000.001 |
|==============================================================================|
| Content: SSL support by OpenSSL |
|==============================================================================|
@@ -507,7 +507,10 @@ begin
Exit;
end;
if SNIHost<>'' then
begin
SSLCtrl(Fssl, SSL_CTRL_SET_TLSEXT_HOSTNAME, TLSEXT_NAMETYPE_host_name, PAnsiChar(AnsiString(SNIHost)));
SslSet1Host(Fssl, PAnsiChar(AnsiString(SNIHost)));
end;
if FSocket.ConnectionTimeout <= 0 then //do blocking call of SSL_Connect
begin
x := sslconnect(FSsl);