[rtmpdump] branch master updated. a312ac7 Fix compat with PolarSSL >= 1.1.0
gitolite
gil at avcodec.org
Tue Oct 30 16:42:22 CET 2012
The branch, master has been updated
via a312ac7770207bd7d07725c1aef43725206e803a (commit)
via dc1ddd3b3f567c036f6909af7f1bfdc135331439 (commit)
from 75a6167863bc415845b9130d6f8f437cbdc185f7 (commit)
- Log -----------------------------------------------------------------
commit a312ac7770207bd7d07725c1aef43725206e803a
Author: Howard Chu <hyc at highlandsun.com>
AuthorDate: Tue Oct 30 08:41:49 2012 -0700
Commit: Howard Chu <hyc at highlandsun.com>
CommitDate: Tue Oct 30 08:41:49 2012 -0700
Fix compat with PolarSSL >= 1.1.0
diff --git a/librtmp/dh.h b/librtmp/dh.h
index 9959532..fa264f8 100644
--- a/librtmp/dh.h
+++ b/librtmp/dh.h
@@ -29,6 +29,9 @@
#ifdef USE_POLARSSL
#include <polarssl/dhm.h>
+#if POLARSSL_VERSION_NUMBER < 0x01010100
+#define havege_random havege_rand
+#endif
typedef mpi * MP_t;
#define MP_new(m) m = malloc(sizeof(mpi)); mpi_init(m)
#define MP_set_w(mpi, w) mpi_lset(mpi, w)
@@ -61,7 +64,7 @@ static int MDH_generate_key(MDH *dh)
MP_set(&dh->ctx.P, dh->p);
MP_set(&dh->ctx.G, dh->g);
dh->ctx.len = 128;
- dhm_make_public(&dh->ctx, 1024, out, 1, havege_rand, &RTMP_TLS_ctx->hs);
+ dhm_make_public(&dh->ctx, 1024, out, 1, havege_random, &RTMP_TLS_ctx->hs);
MP_new(dh->pub_key);
MP_new(dh->priv_key);
MP_set(dh->pub_key, &dh->ctx.GX);
diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c
index 52d0254..76a6b4f 100644
--- a/librtmp/rtmp.c
+++ b/librtmp/rtmp.c
@@ -33,6 +33,7 @@
#ifdef CRYPTO
#ifdef USE_POLARSSL
+#include <polarssl/version.h>
#include <polarssl/havege.h>
#elif defined(USE_GNUTLS)
#include <gnutls/gnutls.h>
diff --git a/librtmp/rtmp_sys.h b/librtmp/rtmp_sys.h
index c3fd4a6..1bf0735 100644
--- a/librtmp/rtmp_sys.h
+++ b/librtmp/rtmp_sys.h
@@ -61,9 +61,13 @@
#include "rtmp.h"
#ifdef USE_POLARSSL
+#include <polarssl/version.h>
#include <polarssl/net.h>
#include <polarssl/ssl.h>
#include <polarssl/havege.h>
+#if POLARSSL_VERSION_NUMBER < 0x01010100
+#define havege_random havege_rand
+#endif
typedef struct tls_ctx {
havege_state hs;
ssl_session ssn;
@@ -71,7 +75,7 @@ typedef struct tls_ctx {
#define TLS_CTX tls_ctx *
#define TLS_client(ctx,s) s = malloc(sizeof(ssl_context)); ssl_init(s);\
ssl_set_endpoint(s, SSL_IS_CLIENT); ssl_set_authmode(s, SSL_VERIFY_NONE);\
- ssl_set_rng(s, havege_rand, &ctx->hs);\
+ ssl_set_rng(s, havege_random, &ctx->hs);\
ssl_set_ciphersuites(s, ssl_default_ciphersuites);\
ssl_set_session(s, 1, 600, &ctx->ssn)
#define TLS_setfd(s,fd) ssl_set_bio(s, net_recv, &fd, net_send, &fd)
commit dc1ddd3b3f567c036f6909af7f1bfdc135331439
Author: Howard Chu <hyc at highlandsun.com>
AuthorDate: Tue Oct 30 08:28:15 2012 -0700
Commit: Howard Chu <hyc at highlandsun.com>
CommitDate: Tue Oct 30 08:28:15 2012 -0700
Fix rare infinite loop on EOF
reported by Matt Robison <rtmpdump at nerdoftheherd.com>
diff --git a/rtmpdump.c b/rtmpdump.c
index 2b30eb2..13741a7 100644
--- a/rtmpdump.c
+++ b/rtmpdump.c
@@ -580,12 +580,14 @@ Download(RTMP * rtmp, // connected RTMP object
}
}
}
-#ifdef _DEBUG
else
{
+#ifdef _DEBUG
RTMP_Log(RTMP_LOGDEBUG, "zero read!");
- }
#endif
+ if (rtmp->m_read.status == RTMP_READ_EOF)
+ break;
+ }
}
while (!RTMP_ctrlC && nRead > -1 && RTMP_IsConnected(rtmp) && !RTMP_IsTimedout(rtmp));
-----------------------------------------------------------------------
Summary of changes:
librtmp/dh.h | 5 ++++-
librtmp/rtmp.c | 1 +
librtmp/rtmp_sys.h | 6 +++++-
rtmpdump.c | 6 ++++--
4 files changed, 14 insertions(+), 4 deletions(-)
hooks/post-receive
--
More information about the rtmpdump
mailing list