From f8fcf64f4f80c070f8c93e40249c43fe6299ffe4 Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Sun, 30 Dec 2012 14:03:58 +0200 Subject: [PATCH] Only use one challenge value in adobe auth Some servers (akamai) only include a 'challenge' parameter, no 'opaque' parameter, while others (wowza) include both 'opaque' and 'challenge'. If 'opaque' is provided, it should be used here, otherwise 'challenge', but never both. After this patch, adobe auth works against both wowza and akamai servers. --- librtmp/rtmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c index d64a0bb..7f1c7ff 100644 --- a/librtmp/rtmp.c +++ b/librtmp/rtmp.c @@ -2609,7 +2609,7 @@ PublisherAuth(RTMP *r, AVal *description) /* response = base64enc(md5(hash1 + opaque + challenge2)) */ if (opaque.av_len) MD5_Update(&md5ctx, opaque.av_val, opaque.av_len); - if (challenge.av_len) + else if (challenge.av_len) MD5_Update(&md5ctx, challenge.av_val, challenge.av_len); MD5_Update(&md5ctx, challenge2, B64INT_LEN); MD5_Final(md5sum_val, &md5ctx); -- 2.11.4.GIT