pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/rdesktop rdesktop: Workaround for key caching in O...
details: https://anonhg.NetBSD.org/pkgsrc/rev/1aa9dfcf1355
branches: trunk
changeset: 393832:1aa9dfcf1355
user: markd <markd%pkgsrc.org@localhost>
date: Mon Mar 25 19:56:08 2019 +0000
description:
rdesktop: Workaround for key caching in OpenSSL > 1.1.0
diffstat:
net/rdesktop/Makefile | 3 +-
net/rdesktop/distinfo | 3 +-
net/rdesktop/patches/patch-ssl.c | 57 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 61 insertions(+), 2 deletions(-)
diffs (86 lines):
diff -r 67742723ea90 -r 1aa9dfcf1355 net/rdesktop/Makefile
--- a/net/rdesktop/Makefile Mon Mar 25 19:53:02 2019 +0000
+++ b/net/rdesktop/Makefile Mon Mar 25 19:56:08 2019 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.48 2019/01/06 16:46:51 tnn Exp $
+# $NetBSD: Makefile,v 1.49 2019/03/25 19:56:08 markd Exp $
DISTNAME= rdesktop-1.8.4
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_GITHUB:=rdesktop/}
GITHUB_RELEASE= v${PKGVERSION_NOREV}
diff -r 67742723ea90 -r 1aa9dfcf1355 net/rdesktop/distinfo
--- a/net/rdesktop/distinfo Mon Mar 25 19:53:02 2019 +0000
+++ b/net/rdesktop/distinfo Mon Mar 25 19:56:08 2019 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.25 2019/01/06 16:46:51 tnn Exp $
+$NetBSD: distinfo,v 1.26 2019/03/25 19:56:08 markd Exp $
SHA1 (rdesktop-1.8.4.tar.gz) = b937573e3f76a494a2b9092a440c9ea3e862d1f3
RMD160 (rdesktop-1.8.4.tar.gz) = 5ad95433c369a9cff11b765e181d97ac41bf8582
SHA512 (rdesktop-1.8.4.tar.gz) = 9e4f6723eb0baab31ad11f1c5c29a4753c655386c2381d01646b7834c959ffc2ec1e0c2f3f73626255aa018889709758d97387c7563da98bb1b7f269610929ae
Size (rdesktop-1.8.4.tar.gz) = 321448 bytes
SHA1 (patch-aa) = a56f15d51e32b3e53fd1e42736944a6805cbe9e0
+SHA1 (patch-ssl.c) = 491b8d8dc8b39d013469fc803177d8163dd42fa3
diff -r 67742723ea90 -r 1aa9dfcf1355 net/rdesktop/patches/patch-ssl.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/rdesktop/patches/patch-ssl.c Mon Mar 25 19:56:08 2019 +0000
@@ -0,0 +1,57 @@
+$NetBSD: patch-ssl.c,v 1.1 2019/03/25 19:56:08 markd Exp $
+
+Workaround for key caching in OpenSSL > 1.1.0 ( fixes #118)
+commit bba4cd2cf0269ec933cb2ccf92743bbcebf3c2da
+
+--- ssl.c.orig 2019-01-02 13:50:34.000000000 +0000
++++ ssl.c
+@@ -143,6 +143,11 @@ rdssl_cert_to_rkey(RDSSL_CERT * cert, ui
+ int nid;
+ int ret;
+
++ const unsigned char *p;
++ int pklen;
++
++ RSA *rsa = NULL;
++
+ /* By some reason, Microsoft sets the OID of the Public RSA key to
+ the oid for "MD5 with RSA Encryption" instead of "RSA Encryption"
+
+@@ -170,9 +175,28 @@ rdssl_cert_to_rkey(RDSSL_CERT * cert, ui
+
+ if ((nid == NID_md5WithRSAEncryption) || (nid == NID_shaWithRSAEncryption))
+ {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ DEBUG_RDP5(("Re-setting algorithm type to RSA in server certificate\n"));
+ X509_PUBKEY_set0_param(key, OBJ_nid2obj(NID_rsaEncryption),
+ 0, NULL, NULL, 0);
++#else
++ if (!X509_PUBKEY_get0_param(NULL, &p, &pklen, NULL, key)) {
++ error("failed to get algorithm used for public key");
++
++ return NULL;
++ }
++
++ if (!(rsa = d2i_RSAPublicKey(NULL, &p, pklen))) {
++ error("failed to extract public key from certificate");
++
++ return NULL;
++ }
++
++ lkey = RSAPublicKey_dup(rsa);
++ *key_len = RSA_size(lkey);
++ return lkey;
++#endif
++
+ }
+ epk = X509_get_pubkey(cert);
+ if (NULL == epk)
+@@ -229,7 +255,7 @@ rdssl_rkey_get_exp_mod(RDSSL_RKEY * rkey
+ e = rkey->e;
+ n = rkey->n;
+ #else
+- RSA_get0_key(rkey, &e, &n, NULL);
++ RSA_get0_key(rkey, &n, &e, NULL);
+ #endif
+
+ if ((BN_num_bytes(e) > (int) max_exp_len) ||
Home |
Main Index |
Thread Index |
Old Index