Hello community, here is the log from the commit of package rdesktop for openSUSE:Factory checked in at 2018-02-15 13:26:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rdesktop (Old) and /work/SRC/openSUSE:Factory/.rdesktop.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rdesktop" Thu Feb 15 13:26:22 2018 rev:35 rq:576499 version:1.8.3 Changes: -------- --- /work/SRC/openSUSE:Factory/rdesktop/rdesktop.changes 2018-02-06 16:47:20.849140643 +0100 +++ /work/SRC/openSUSE:Factory/.rdesktop.new/rdesktop.changes 2018-02-15 13:26:48.013155966 +0100 @@ -1,0 +2,6 @@ +Mon Feb 12 23:25:43 UTC 2018 - [email protected] + +- Added rdesktop-Fix-key-caching.patch + backport of https://github.com/rdesktop/rdesktop/commit/a3dfceefc2c729243b71270e3f503fa2dd57ec8d + +------------------------------------------------------------------- New: ---- rdesktop-Fix-key-caching.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rdesktop.spec ++++++ --- /var/tmp/diff_new_pack.53vYGx/_old 2018-02-15 13:26:48.969121243 +0100 +++ /var/tmp/diff_new_pack.53vYGx/_new 2018-02-15 13:26:48.973121097 +0100 @@ -32,6 +32,7 @@ Patch2: rdesktop-Fix-crash-in-rdssl_cert_to_rkey.patch # PATCH-FIX-OPENSUSE rdesktop-Fix-keymap-script.patch Patch3: rdesktop-Fix-keymap-script.patch +Patch4: rdesktop-Fix-key-caching.patch BuildRequires: alsa-devel BuildRequires: autoconf BuildRequires: automake @@ -58,6 +59,7 @@ %if 0%{?suse_version} > 1110 %patch1 -p1 %patch2 -p1 +%patch4 -p1 %endif %patch3 -p1 ++++++ rdesktop-Fix-key-caching.patch ++++++ Index: rdesktop-1.8.3/ssl.c =================================================================== --- rdesktop-1.8.3.orig/ssl.c +++ rdesktop-1.8.3/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,10 +175,29 @@ 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\n"); + return NULL; + } + + if (!(rsa = d2i_RSAPublicKey(NULL, &p, pklen))) { + error("Failed to extract public key from certificate\n"); + return NULL; + } + + lkey = RSAPublicKey_dup(rsa); + *key_len = RSA_size(lkey); + return lkey; +#endif + } + epk = X509_get_pubkey(cert); if (NULL == epk) { @@ -229,7 +253,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) ||
