Browse Source

* When InitContext fails, TSSLSocketHandler.Connect should return false.

git-svn-id: trunk@36851 -
joost 8 years ago
parent
commit
4d2d45da0b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      packages/fcl-net/src/sslsockets.pp

+ 2 - 1
packages/fcl-net/src/sslsockets.pp

@@ -221,7 +221,8 @@ end;
 function TSSLSocketHandler.Connect: Boolean;
 begin
   Result:=Inherited Connect;
-  if Result and InitContext(False) then
+  Result := Result and InitContext(False);
+  if Result then
     begin
     Result:=CheckSSL(FSSL.SetFD(FSocket.Handle));
     if Result then