[rtmpdump] [PATCH] Getting swf hash fails with https URLs

Jeff Johnson jeff at rogueamoeba.com
Sun Nov 6 16:23:01 CET 2011


Below is a patch to fix swf hash for https URLs.

The variable i represents the number of bytes in the HTTP request. This value is assigned by sprintf commands earlier. There's no reason to assign it the return value of TLS_connect, which is actually 1 on success. When i = 1, only the first byte of the HTTP request is sent, so the server never responds, and eventually the connection times out.


Jeff Johnson
Rogue Amoeba Software, LLC

diff --git a/librtmp/hashswf.c b/librtmp/hashswf.c
index 3c56b69..5576730 100644
--- a/librtmp/hashswf.c
+++ b/librtmp/hashswf.c
@@ -163,7 +163,7 @@ HTTP_get(struct HTTP_ctx *http, const char *url, HTTP_read_callback *cb)
       TLS_client(RTMP_TLS_ctx, sb.sb_ssl);
       TLS_setfd(sb.sb_ssl, sb.sb_socket);
-      if ((i = TLS_connect(sb.sb_ssl)) < 0)
+      if (TLS_connect(sb.sb_ssl) < 0)
          RTMP_Log(RTMP_LOGERROR, "%s, TLS_Connect failed", __FUNCTION__);

More information about the rtmpdump mailing list