FreeBSD Bugzilla – Attachment 177599 Details for
Bug 214999
[PATCH] audio/pulseaudio: Fix OpenSSL 1.1. compatibility
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to fix openssl 1.1. compatibility
fix-audio-pulseaudio-openssl11-compat (text/plain), 2.37 KB, created by
Melvyn Sopacua
on 2016-12-02 10:33:42 UTC
(
hide
)
Description:
Patch to fix openssl 1.1. compatibility
Filename:
MIME Type:
Creator:
Melvyn Sopacua
Created:
2016-12-02 10:33:42 UTC
Size:
2.37 KB
patch
obsolete
>From 6c4d6276a48d3a0fbdbe344fea4366219eabb7c4 Mon Sep 17 00:00:00 2001 >From: Melvyn Sopacua <me@example.com> >Date: Thu, 1 Dec 2016 15:25:38 +0100 >Subject: [PATCH] audio/pulseaudio: Fix OpenSSL 1.1 compat > >Verbatim patch already applied and forthcoming upstream. > >Obtained from: https://bugs.freedesktop.org/show_bug.cgi?id=96726 >--- > .../files/patch-src_modules_raop_raop_client.c | 44 ++++++++++++++++++++++ > 1 file changed, 44 insertions(+) > create mode 100644 audio/pulseaudio/files/patch-src_modules_raop_raop_client.c > >diff --git a/audio/pulseaudio/files/patch-src_modules_raop_raop_client.c b/audio/pulseaudio/files/patch-src_modules_raop_raop_client.c >new file mode 100644 >index 0000000..8d4f047 >--- /dev/null >+++ audio/pulseaudio/files/patch-src_modules_raop_raop_client.c >@@ -0,0 +1,44 @@ >+diff --git a/src/modules/raop/raop_client.c b/src/modules/raop/raop_client.c >+index 3b6c36e..864c558 100644 >+--- src/modules/raop/raop_client.c.orig >++++ src/modules/raop/raop_client.c >+@@ -68,6 +68,21 @@ >+ >+ #define RAOP_PORT 5000 >+ >++/* Openssl 1.1.0 broke compatibility. Before 1.1.0 we had to set RSA->n and >++ * RSA->e manually, but after 1.1.0 the RSA struct is opaque and we have to use >++ * RSA_set0_key(). RSA_set0_key() is a new function added in 1.1.0. We could >++ * depend on openssl 1.1.0, but it may take some time before distributions will >++ * be able to upgrade to the new openssl version. To insulate ourselves from >++ * such transition problems, let's implement RSA_set0_key() ourselves if it's >++ * not available. */ >++#if OPENSSL_VERSION_NUMBER < 0x10100000L >++static int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d) { >++ r->n = n; >++ r->e = e; >++ return 1; >++} >++#endif >++ >+ struct pa_raop_client { >+ pa_core *core; >+ char *host; >+@@ -161,12 +176,15 @@ static int rsa_encrypt(uint8_t *text, int len, uint8_t *res) { >+ uint8_t exponent[8]; >+ int size; >+ RSA *rsa; >++ BIGNUM *n_bn; >++ BIGNUM *e_bn; >+ >+ rsa = RSA_new(); >+ size = pa_base64_decode(n, modules); >+- rsa->n = BN_bin2bn(modules, size, NULL); >++ n_bn = BN_bin2bn(modules, size, NULL); >+ size = pa_base64_decode(e, exponent); >+- rsa->e = BN_bin2bn(exponent, size, NULL); >++ e_bn = BN_bin2bn(exponent, size, NULL); >++ RSA_set0_key(rsa, n_bn, e_bn, NULL); >+ >+ size = RSA_public_encrypt(len, text, res, rsa, RSA_PKCS1_OAEP_PADDING); >+ RSA_free(rsa); >-- >2.10.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 214999
: 177599