aboutsummaryrefslogtreecommitdiff
path: root/audio/xmms2
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2018-10-14 19:28:57 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2018-10-14 19:28:57 +0000
commit91079fc1de918cfe1a2b17ae6665b8f3f079d47a (patch)
tree1b9db4bedca75fb1629f1a35350c4e78e7569869 /audio/xmms2
parent5c93a6357f7d2e7f0f28d667746b84418a195c16 (diff)
downloadports-91079fc1de918cfe1a2b17ae6665b8f3f079d47a.tar.gz
ports-91079fc1de918cfe1a2b17ae6665b8f3f079d47a.zip
Fix build with OpenSSL 1.1.x
PR: 232154 Submitted by: me
Notes
Notes: svn path=/head/; revision=482109
Diffstat (limited to 'audio/xmms2')
-rw-r--r--audio/xmms2/files/patch-src_plugins_airplay_raop__client.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/audio/xmms2/files/patch-src_plugins_airplay_raop__client.c b/audio/xmms2/files/patch-src_plugins_airplay_raop__client.c
new file mode 100644
index 000000000000..ddf7db6376c4
--- /dev/null
+++ b/audio/xmms2/files/patch-src_plugins_airplay_raop__client.c
@@ -0,0 +1,25 @@
+--- src/plugins/airplay/raop_client.c.orig 2011-10-20 19:26:08 UTC
++++ src/plugins/airplay/raop_client.c
+@@ -1,6 +1,8 @@
+ #include <string.h>
+ #include <unistd.h>
+
++#include <openssl/opensslv.h>
++#include <openssl/ossl_typ.h>
+ #include <openssl/rand.h>
+ #include <openssl/rsa.h>
+ #include <openssl/bio.h>
+@@ -137,8 +139,13 @@ raop_rsa_encrypt (guchar *text, gint len, guchar *res)
+ static const guchar exp[] = {0x01, 0x00, 0x01};
+
+ rsa = RSA_new ();
++
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ rsa->n = BN_bin2bn (mod, 256, NULL);
+ rsa->e = BN_bin2bn (exp, 3, NULL);
++#else
++ RSA_set0_key(rsa, BN_bin2bn (mod, 256, NULL), BN_bin2bn (exp, 3, NULL), NULL);
++#endif
+
+ size = RSA_public_encrypt (len, text, res, rsa, RSA_PKCS1_OAEP_PADDING);
+