Browse Source

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

git-svn-id: trunk@36853 -
joost 8 years ago
parent
commit
fd8072e525
1 changed files with 7 additions and 1 deletions
  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);