[SCM] rtmpdump packaging branch, master, updated. 5c0338a2d1a0b4f32e09468caa50e66d75bdff78
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Tue Jun 1 12:28:28 UTC 2010
The following commit has been merged in the master branch:
commit 5c0338a2d1a0b4f32e09468caa50e66d75bdff78
Author: Reinhard Tartler <siretart at tauware.de>
Date: Tue Jun 1 14:28:09 2010 +0200
fetch upstream commit "Fix RC4 teardown for GnuTLS/gcrypt"
diff --git a/debian/patches/02_fix_gnutls_teardown.diff b/debian/patches/02_fix_gnutls_teardown.diff
new file mode 100644
index 0000000..e2d7979
--- /dev/null
+++ b/debian/patches/02_fix_gnutls_teardown.diff
@@ -0,0 +1,78 @@
+From: Howard Chu
+Subject: Fix RC4 teardown for GnuTLS/gcrypt
+Applied-Upstream: r498
+
+
+Index: trunk/librtmp/rtmp.c
+===================================================================
+--- trunk/librtmp/rtmp.c (Revision 497)
++++ trunk/librtmp/rtmp.c (Revision 498)
+@@ -3384,12 +3384,12 @@
+ }
+ if (r->Link.rc4keyIn)
+ {
+- free(r->Link.rc4keyIn);
++ RC4_free(r->Link.rc4keyIn);
+ r->Link.rc4keyIn = NULL;
+ }
+ if (r->Link.rc4keyOut)
+ {
+- free(r->Link.rc4keyOut);
++ RC4_free(r->Link.rc4keyOut);
+ r->Link.rc4keyOut = NULL;
+ }
+ #endif
+Index: trunk/librtmp/handshake.h
+===================================================================
+--- trunk/librtmp/handshake.h (Revision 497)
++++ trunk/librtmp/handshake.h (Revision 498)
+@@ -35,10 +35,11 @@
+ #define HMAC_finish(ctx, dig, dlen) dlen = SHA256_DIGEST_LENGTH; sha2_hmac_finish(&ctx, dig)
+
+ typedef arc4_context * RC4_handle;
+-#define RC4_setup(h) *h = malloc(sizeof(arc4_context))
++#define RC4_alloc(h) *h = malloc(sizeof(arc4_context))
+ #define RC4_setkey(h,l,k) arc4_setup(h,k,l)
+ #define RC4_encrypt(h,l,d) arc4_crypt(h,l,(unsigned char *)d,(unsigned char *)d)
+ #define RC4_encrypt2(h,l,s,d) arc4_crypt(h,l,(unsigned char *)s,(unsigned char *)d)
++#define RC4_free(h) free(h)
+
+ #elif defined(USE_GNUTLS)
+ #include <gcrypt.h>
+@@ -51,10 +52,11 @@
+ #define HMAC_finish(ctx, dig, dlen) dlen = SHA256_DIGEST_LENGTH; memcpy(dig, gcry_md_read(ctx, 0), dlen); gcry_md_close(ctx)
+
+ typedef gcry_cipher_hd_t RC4_handle;
+-#define RC4_setup(h) gcry_cipher_open(h, GCRY_CIPHER_ARCFOUR, GCRY_CIPHER_MODE_STREAM, 0)
++#define RC4_alloc(h) gcry_cipher_open(h, GCRY_CIPHER_ARCFOUR, GCRY_CIPHER_MODE_STREAM, 0)
+ #define RC4_setkey(h,l,k) gcry_cipher_setkey(h,k,l)
+ #define RC4_encrypt(h,l,d) gcry_cipher_encrypt(h,(void *)d,l,NULL,0)
+ #define RC4_encrypt2(h,l,s,d) gcry_cipher_encrypt(h,(void *)d,l,(void *)s,l)
++#define RC4_free(h) gcry_cipher_close(h)
+
+ #else /* USE_OPENSSL */
+ #include <openssl/sha.h>
+@@ -68,10 +70,11 @@
+ #define HMAC_finish(ctx, dig, dlen) HMAC_Final(&ctx, dig, &dlen); HMAC_CTX_cleanup(&ctx)
+
+ typedef RC4_KEY * RC4_handle;
+-#define RC4_setup(h) *h = malloc(sizeof(RC4_KEY))
++#define RC4_alloc(h) *h = malloc(sizeof(RC4_KEY))
+ #define RC4_setkey(h,l,k) RC4_set_key(h,l,k)
+ #define RC4_encrypt(h,l,d) RC4(h,l,(uint8_t *)d,(uint8_t *)d)
+ #define RC4_encrypt2(h,l,s,d) RC4(h,l,(uint8_t *)s,(uint8_t *)d)
++#define RC4_free(h) free(h)
+ #endif
+
+ #define FP10
+@@ -112,8 +115,8 @@
+ unsigned int digestLen = 0;
+ HMAC_CTX ctx;
+
+- RC4_setup(rc4keyIn);
+- RC4_setup(rc4keyOut);
++ RC4_alloc(rc4keyIn);
++ RC4_alloc(rc4keyOut);
+
+ HMAC_setup(ctx, secretKey, 128);
+ HMAC_crunch(ctx, pubKeyIn, 128);
diff --git a/debian/patches/series b/debian/patches/series
index cd7024e..4b2f097 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
01_unbreak_makefile.diff
+02_fix_gnutls_teardown.diff
--
rtmpdump packaging
More information about the pkg-multimedia-commits
mailing list