parent
55a6f922af
commit
cff83e1d40
2 changed files with 112 additions and 3 deletions
@ -0,0 +1,101 @@ |
|||||||
|
diff -Naupr transmisson-remote-gui-5.6.0_orig/synapse/source/lib/blcksock.pas transmisson-remote-gui-5.6.0/synapse/source/lib/blcksock.pas
|
||||||
|
--- transmisson-remote-gui-5.6.0_orig/synapse/source/lib/blcksock.pas 2017-04-15 17:28:12.000000000 +0700
|
||||||
|
+++ transmisson-remote-gui-5.6.0/synapse/source/lib/blcksock.pas 2017-04-29 12:55:14.663103205 +0700
|
||||||
|
@@ -239,9 +239,6 @@ type
|
||||||
|
|
||||||
|
{:Specify requested SSL/TLS version for secure connection.}
|
||||||
|
TSSLType = (
|
||||||
|
- LT_all,
|
||||||
|
- LT_SSLv2,
|
||||||
|
- LT_SSLv3,
|
||||||
|
LT_TLSv1,
|
||||||
|
LT_TLSv1_1,
|
||||||
|
LT_TLSv1_2,
|
||||||
|
@@ -4135,7 +4132,7 @@ begin
|
||||||
|
FLastError := 0;
|
||||||
|
FLastErrorDesc := '';
|
||||||
|
FVerifyCert := False;
|
||||||
|
- FSSLType := LT_all;
|
||||||
|
+ FSSLType := LT_TLSv1;
|
||||||
|
FKeyPassword := '';
|
||||||
|
FCiphers := '';
|
||||||
|
FCertificateFile := '';
|
||||||
|
diff -Naupr transmisson-remote-gui-5.6.0_orig/synapse/source/lib/ssl_cryptlib.pas transmisson-remote-gui-5.6.0/synapse/source/lib/ssl_cryptlib.pas
|
||||||
|
--- transmisson-remote-gui-5.6.0_orig/synapse/source/lib/ssl_cryptlib.pas 2017-04-15 17:28:12.000000000 +0700
|
||||||
|
+++ transmisson-remote-gui-5.6.0/synapse/source/lib/ssl_cryptlib.pas 2017-04-29 12:54:23.906175491 +0700
|
||||||
|
@@ -296,7 +296,7 @@ begin
|
||||||
|
FcryptSession := CRYPT_SESSION(CRYPT_SESSION_NONE);
|
||||||
|
if server then
|
||||||
|
case FSSLType of
|
||||||
|
- LT_all, LT_SSLv3, LT_TLSv1, LT_TLSv1_1:
|
||||||
|
+ LT_TLSv1, LT_TLSv1_1, LT_TLSv1_2:
|
||||||
|
st := CRYPT_SESSION_SSL_SERVER;
|
||||||
|
LT_SSHv2:
|
||||||
|
st := CRYPT_SESSION_SSH_SERVER;
|
||||||
|
@@ -305,7 +305,7 @@ begin
|
||||||
|
end
|
||||||
|
else
|
||||||
|
case FSSLType of
|
||||||
|
- LT_all, LT_SSLv3, LT_TLSv1, LT_TLSv1_1:
|
||||||
|
+ LT_TLSv1, LT_TLSv1_1, TL_TLSv1_2:
|
||||||
|
st := CRYPT_SESSION_SSL;
|
||||||
|
LT_SSHv2:
|
||||||
|
st := CRYPT_SESSION_SSH;
|
||||||
|
@@ -316,12 +316,12 @@ begin
|
||||||
|
Exit;
|
||||||
|
x := -1;
|
||||||
|
case FSSLType of
|
||||||
|
- LT_SSLv3:
|
||||||
|
- x := 0;
|
||||||
|
LT_TLSv1:
|
||||||
|
- x := 1;
|
||||||
|
+ x := 0;
|
||||||
|
LT_TLSv1_1:
|
||||||
|
- x := 2;
|
||||||
|
+ x := 1;
|
||||||
|
+ LT_TLSv1_2:
|
||||||
|
+ x := 3;
|
||||||
|
end;
|
||||||
|
if x >= 0 then
|
||||||
|
if not SSLCheck(cryptSetAttribute(FCryptSession, CRYPT_SESSINFO_VERSION, x)) then
|
||||||
|
@@ -507,14 +507,14 @@ begin
|
||||||
|
if FcryptSession = CRYPT_SESSION(CRYPT_SESSION_NONE) then
|
||||||
|
Exit;
|
||||||
|
cryptGetAttribute(FCryptSession, CRYPT_SESSINFO_VERSION, x);
|
||||||
|
- if FSSLType in [LT_SSLv3, LT_TLSv1, LT_TLSv1_1, LT_all] then
|
||||||
|
+ if FSSLType in [LT_TLSv1, LT_TLSv1_1, LT_TLSv1_2] then
|
||||||
|
case x of
|
||||||
|
0:
|
||||||
|
- Result := 'SSLv3';
|
||||||
|
- 1:
|
||||||
|
Result := 'TLSv1';
|
||||||
|
- 2:
|
||||||
|
+ 1:
|
||||||
|
Result := 'TLSv1.1';
|
||||||
|
+ 2:
|
||||||
|
+ Result := 'TLSv1.2';
|
||||||
|
end;
|
||||||
|
if FSSLType in [LT_SSHv2] then
|
||||||
|
case x of
|
||||||
|
diff -Naupr transmisson-remote-gui-5.6.0_orig/synapse/source/lib/ssl_openssl.pas transmisson-remote-gui-5.6.0/synapse/source/lib/ssl_openssl.pas
|
||||||
|
--- transmisson-remote-gui-5.6.0_orig/synapse/source/lib/ssl_openssl.pas 2017-04-15 17:28:12.000000000 +0700
|
||||||
|
+++ transmisson-remote-gui-5.6.0/synapse/source/lib/ssl_openssl.pas 2017-04-29 12:50:26.444964932 +0700
|
||||||
|
@@ -420,18 +420,12 @@ begin
|
||||||
|
FLastError := 0;
|
||||||
|
Fctx := nil;
|
||||||
|
case FSSLType of
|
||||||
|
- LT_SSLv2:
|
||||||
|
- Fctx := SslCtxNew(SslMethodV2);
|
||||||
|
- LT_SSLv3:
|
||||||
|
- Fctx := SslCtxNew(SslMethodV3);
|
||||||
|
LT_TLSv1:
|
||||||
|
Fctx := SslCtxNew(SslMethodTLSV1);
|
||||||
|
LT_TLSv1_1:
|
||||||
|
Fctx := SslCtxNew(SslMethodTLSV11);
|
||||||
|
LT_TLSv1_2:
|
||||||
|
Fctx := SslCtxNew(SslMethodTLSV12);
|
||||||
|
- LT_all:
|
||||||
|
- Fctx := SslCtxNew(SslMethodV23);
|
||||||
|
else
|
||||||
|
Exit;
|
||||||
|
end;
|
Loading…
Reference in new issue