Fix building with OpenSSL 1.1.0

master
Taeyeon Mori 8 years ago
parent 55a6f922af
commit cff83e1d40
  1. 14
      PKGBUILD
  2. 101
      openssl-1.1.0-compat.patch

@ -4,7 +4,7 @@
pkgname=transmission-remote-gui-qt4 pkgname=transmission-remote-gui-qt4
_pkgname=transgui _pkgname=transgui
pkgver=5.6.0 pkgver=5.6.0
pkgrel=1 pkgrel=2
pkgdesc='Cross platform remote GUI for the Transmission daemon' pkgdesc='Cross platform remote GUI for the Transmission daemon'
arch=(i686 x86_64) arch=(i686 x86_64)
url='https://github.com/leonsoft-kras/transmisson-remote-gui' url='https://github.com/leonsoft-kras/transmisson-remote-gui'
@ -15,11 +15,19 @@ provides=(transmission-remote-gui)
conflicts=(transmission-remote-gui-gtk2 transmission-remote-gui-svn transmission-remote-gui) conflicts=(transmission-remote-gui-gtk2 transmission-remote-gui-svn transmission-remote-gui)
install=transmission-remote-gui.install install=transmission-remote-gui.install
source=("transmission-remote-gui-${pkgver}.tar.gz::https://github.com/leonsoft-kras/transmisson-remote-gui/archive/v${pkgver}.tar.gz" source=("transmission-remote-gui-${pkgver}.tar.gz::https://github.com/leonsoft-kras/transmisson-remote-gui/archive/v${pkgver}.tar.gz"
"${_pkgname}.desktop") "${_pkgname}.desktop"
"openssl-1.1.0-compat.patch") # https://github.com/leonsoft-kras/transmisson-remote-gui/issues/941#issuecomment-298150227
md5sums=('815382bf8a43d49747ac2564f69099ed' md5sums=('815382bf8a43d49747ac2564f69099ed'
'c0504cb6d4e970892ac7be9206c787b5') 'c0504cb6d4e970892ac7be9206c787b5'
'699bf84a01fbb56056a38067a6760fe3')
_ws=qt _ws=qt
prepare() {
cd "${srcdir}/transmisson-remote-gui-${pkgver}"
patch --binary -p1 -i "${srcdir}/openssl-1.1.0-compat.patch"
}
build() { build() {
mkdir "${srcdir}/config" mkdir "${srcdir}/config"
cd "${srcdir}/transmisson-remote-gui-${pkgver}" cd "${srcdir}/transmisson-remote-gui-${pkgver}"

@ -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…
Cancel
Save