Page MenuHomeFreeBSD

D37454.id113380.diff
No OneTemporary

D37454.id113380.diff

Index: multimedia/librtmp/files/patch-librtmp-dh.h
===================================================================
--- multimedia/librtmp/files/patch-librtmp-dh.h
+++ multimedia/librtmp/files/patch-librtmp-dh.h
@@ -1,4 +1,4 @@
---- librtmp/dh.h.orig 2016-02-29 01:15:13 UTC
+--- librtmp/dh.h.orig 2019-03-30 21:33:00 UTC
+++ librtmp/dh.h
@@ -194,7 +194,7 @@ typedef BIGNUM * MP_t;
@@ -13,7 +13,7 @@
if (!dh)
goto failed;
-+#if !defined(USE_OPENSSL) || defined(LIBRESSL_VERSION_NUMBER) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
MP_new(dh->g);
if (!dh->g)
@@ -26,7 +26,7 @@
+ goto failed;
+#endif
+
-+#if !defined(USE_OPENSSL) || defined(LIBRESSL_VERSION_NUMBER) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
MP_gethex(dh->p, P1024, res); /* prime P1024, see dhgroups.h */
+#else
+ const BIGNUM *p = DH_get0_p(dh);
@@ -38,14 +38,14 @@
goto failed;
}
-+#if !defined(USE_OPENSSL) || defined(LIBRESSL_VERSION_NUMBER) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
MP_set_w(dh->g, 2); /* base 2 */
+#else
+ MP_set_w(g, 2); /* base 2 */
+ DH_set0_pqg(dh, p, NULL, g);
+#endif
-+#if !defined(USE_OPENSSL) || defined(LIBRESSL_VERSION_NUMBER) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
dh->length = nKeyBits;
+#else
+ DH_set_length(dh, nKeyBits);
@@ -57,14 +57,14 @@
MP_gethex(q1, Q1024, res);
assert(res);
-+#if !defined(USE_OPENSSL) || defined(LIBRESSL_VERSION_NUMBER) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
res = isValidPublicKey(dh->pub_key, dh->p, q1);
+#else
+ res = isValidPublicKey(DH_get0_pub_key(dh), DH_get0_p(dh), q1);
+#endif
if (!res)
{
-+#if !defined(USE_OPENSSL) || defined(LIBRESSL_VERSION_NUMBER) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
MP_free(dh->pub_key);
MP_free(dh->priv_key);
dh->pub_key = dh->priv_key = 0;
@@ -78,14 +78,14 @@
DHGetPublicKey(MDH *dh, uint8_t *pubkey, size_t nPubkeyLen)
{
int len;
-+#if !defined(USE_OPENSSL) || defined(LIBRESSL_VERSION_NUMBER) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
if (!dh || !dh->pub_key)
+#else
+ if (!dh || !DH_get0_pub_key(dh))
+#endif
return 0;
-+#if !defined(USE_OPENSSL) || defined(LIBRESSL_VERSION_NUMBER) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
len = MP_bytes(dh->pub_key);
+#else
+ len = MP_bytes(DH_get0_pub_key(dh));
@@ -94,7 +94,7 @@
return 0;
memset(pubkey, 0, nPubkeyLen);
-+#if !defined(USE_OPENSSL) || defined(LIBRESSL_VERSION_NUMBER) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
MP_setbin(dh->pub_key, pubkey + (nPubkeyLen - len), len);
+#else
+ MP_setbin(DH_get0_pub_key(dh), pubkey + (nPubkeyLen - len), len);
@@ -102,11 +102,11 @@
return 1;
}
-@@ -364,7 +407,11 @@ DHComputeSharedSecretKey(MDH *dh, uint8_
+@@ -364,7 +407,11 @@ DHComputeSharedSecretKey(MDH *dh, uint8_t *pubkey, siz
MP_gethex(q1, Q1024, len);
assert(len);
-+#if !defined(USE_OPENSSL) || defined(LIBRESSL_VERSION_NUMBER) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
if (isValidPublicKey(pubkeyBn, dh->p, q1))
+#else
+ if (isValidPublicKey(pubkeyBn, DH_get0_p(dh), q1))
Index: multimedia/librtmp/files/patch-librtmp-handshake.h
===================================================================
--- multimedia/librtmp/files/patch-librtmp-handshake.h
+++ multimedia/librtmp/files/patch-librtmp-handshake.h
@@ -1,4 +1,4 @@
---- librtmp/handshake.h.orig 2016-02-29 01:15:13 UTC
+--- librtmp/handshake.h.orig 2019-03-30 21:33:00 UTC
+++ librtmp/handshake.h
@@ -31,9 +31,13 @@
#define SHA256_DIGEST_LENGTH 32
@@ -46,7 +46,7 @@
-#define HMAC_setup(ctx, key, len) HMAC_CTX_init(&ctx); HMAC_Init_ex(&ctx, key, len, EVP_sha256(), 0)
-#define HMAC_crunch(ctx, buf, len) HMAC_Update(&ctx, buf, len)
-#define HMAC_finish(ctx, dig, dlen) HMAC_Final(&ctx, dig, &dlen); HMAC_CTX_cleanup(&ctx)
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#define HMAC_setup(ctx, key, len) do { \
+ if (ctx == NULL) \
+ ctx = calloc(1, sizeof(*ctx)); \
@@ -63,7 +63,7 @@
+ } while (0)
+#endif
+#define HMAC_crunch(ctx, buf, len) HMAC_Update(ctx, buf, len)
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#define HMAC_finish(ctx, dig, dlen) do { \
+ HMAC_Final(ctx, dig, &dlen); \
+ HMAC_CTX_cleanup(ctx); \
@@ -89,7 +89,7 @@
RC4_alloc(rc4keyIn);
RC4_alloc(rc4keyOut);
-@@ -266,7 +305,7 @@ HMACsha256(const uint8_t *message, size_
+@@ -266,7 +305,7 @@ HMACsha256(const uint8_t *message, size_t messageLen,
size_t keylen, uint8_t *digest)
{
unsigned int digestLen;
Index: multimedia/librtmp/files/patch-librtmp-hashswf.c
===================================================================
--- multimedia/librtmp/files/patch-librtmp-hashswf.c
+++ multimedia/librtmp/files/patch-librtmp-hashswf.c
@@ -1,4 +1,4 @@
---- librtmp/hashswf.c.orig 2016-02-29 01:15:13 UTC
+--- librtmp/hashswf.c.orig 2019-03-30 21:33:00 UTC
+++ librtmp/hashswf.c
@@ -37,10 +37,17 @@
#define SHA256_DIGEST_LENGTH 32
@@ -22,7 +22,7 @@
#elif defined(USE_GNUTLS)
#include <nettle/hmac.h>
#ifndef SHA256_DIGEST_LENGTH
-@@ -48,19 +55,51 @@
+@@ -48,20 +55,52 @@
#endif
#undef HMAC_CTX
#define HMAC_CTX struct hmac_sha256_ctx
@@ -50,7 +50,7 @@
-#define HMAC_crunch(ctx, buf, len) HMAC_Update(&ctx, (unsigned char *)buf, len)
-#define HMAC_finish(ctx, dig, dlen) HMAC_Final(&ctx, (unsigned char *)dig, &dlen);
-#define HMAC_close(ctx) HMAC_CTX_cleanup(&ctx)
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#define HMAC_setup(ctx, key, len) do { \
+ if (ctx == NULL) \
+ ctx = calloc(1, sizeof(*ctx)); \
@@ -63,10 +63,10 @@
+ ctx = HMAC_CTX_new(); \
+ HMAC_Init_ex(ctx, (unsigned char *)key, len, EVP_sha256(), 0); \
+ } while (0);
-+#endif
+ #endif
+#define HMAC_crunch(ctx, buf, len) HMAC_Update(ctx, (unsigned char *)buf, len)
+#define HMAC_finish(ctx, dig, dlen) HMAC_Final(ctx, (unsigned char *)dig, &dlen);
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#define HMAC_close(ctx) do { \
+ HMAC_CTX_cleanup(ctx); \
+ free(ctx); \
@@ -79,10 +79,11 @@
+ ctx = NULL; \
+ } while (0)
+#endif
- #endif
++#endif
extern void RTMP_TLS_Init();
-@@ -289,7 +328,7 @@ leave:
+ extern TLS_CTX RTMP_TLS_ctx;
+@@ -298,7 +337,7 @@ leave:
struct info
{
z_stream *zs;

File Metadata

Mime Type
text/plain
Expires
Fri, Apr 24, 3:01 AM (5 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32057035
Default Alt Text
D37454.id113380.diff (7 KB)

Event Timeline