summaryrefslogtreecommitdiff
path: root/audio/xmms2/files/patch-src_plugins_airplay_raop__client.c
diff options
context:
space:
mode:
authorAntoine Brodin <antoine@FreeBSD.org>2021-01-01 10:11:34 +0000
committerAntoine Brodin <antoine@FreeBSD.org>2021-01-01 10:11:34 +0000
commit26b4c8f71f91d22e081b27814782686edde0c90a (patch)
tree1c321c39372c25d8634e75b5c8e08edc676b296d /audio/xmms2/files/patch-src_plugins_airplay_raop__client.c
parentNew port: math/py-optuna: A hyperparameter optimization framework (diff)
Revert r559792 to unbreak INDEX and bulk -a
It seems a lot of reverse dependencies were missed With hat: portmgr
Diffstat (limited to 'audio/xmms2/files/patch-src_plugins_airplay_raop__client.c')
-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);
+