Преглед на файлове

* When available, try to negotiate a TLS connection, if not available, use the deprecated way (sslv23)

git-svn-id: trunk@36853 -
joost преди 8 години
родител
ревизия
fd8072e525
променени са 1 файла, в които са добавени 7 реда и са изтрити 1 реда
  1. 7 1
      packages/openssl/src/fpopenssl.pp

+ 7 - 1
packages/openssl/src/fpopenssl.pp

@@ -182,7 +182,13 @@ Var
 begin
   C := nil;
   Case AType of
-    stAny:  C := SslCtxNew(SslMethodV23);
+    stAny:
+      begin
+        if Assigned(SslTLSMethod) then
+          C := SslCtxNew(SslTLSMethod)
+        else
+          C := SslCtxNew(SslMethodV23);
+      end;
     stSSLv2: C := SslCtxNew(SslMethodV2);
     stSSLv3: C := SslCtxNew(SslMethodV3);
     stTLSv1: C := SslCtxNew(SslMethodTLSV1);