I am using synalist-code-r209-trunk and in my project uses clause I add
ssl_openssl

The ssleay32.dll File version is 1.0.2.17,  Product Version: 1.0.2q

My environment is windows 10 64 bit.

I write both the client and server side with synapse and in my server side, after I
  aSocket:=ServerSock.Accept;

normally,  I will create a thread and a TTCPBlockSocket and then assign the aSocket to this TTCPBlockSocket.Socket object.

On the client side, when TTCPBlockSocket.OnAfterConnect, I call the TTCPBlockSocket.SSLDoConnect.

However, I found out that, if I don't create a TTCPBlockSocket and assign the aSocket to TTCPBlockSocket.Socket,
(e.g. because the client IP is on my blacklist),
the client side (when  will goes into freezing stable (block forever) at the line
x := sslconnect(FSsl);
in the unit ssl_openssl

In there a bug in the synapse or in the openssl dll?

Thanks a lot in advance.

Dennis
----------------------------------
function TSSLOpenSSL.Connect: boolean;
var
  x: integer;
  b: boolean;
  err: integer;
begin
  Result := False;
  if FSocket.Socket = INVALID_SOCKET then
    Exit;
  if Prepare(False) then
  begin
{$IFDEF CIL}
    if sslsetfd(FSsl, FSocket.Socket.Handle.ToInt32) < 1 then
{$ELSE}
    if sslsetfd(FSsl, FSocket.Socket) < 1 then
{$ENDIF}
    begin
      SSLCheck;
      Exit;
    end;
    if SNIHost<>'' then
      SSLCtrl(Fssl, SSL_CTRL_SET_TLSEXT_HOSTNAME, TLSEXT_NAMETYPE_host_name, PAnsiChar(AnsiString(SNIHost)));     if FSocket.ConnectionTimeout <= 0 then //do blocking call of SSL_Connect
    begin
      x := sslconnect(FSsl); //error. this will hang forever if server side does not create aTTCPBlockSocket
     if x < 1 then
      begin
        SSLcheck;
        Exit;
      end;
    end
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to