On Wed, 28 Aug 2013, Kostya Shishkov wrote:
On Wed, Aug 28, 2013 at 02:45:00PM +0300, Martin Storsjö wrote:When streaming to limelight, the app name is either a full "appname/subaccount" or "appname/_definst_". In the latter case, the app name can be simplified into simply "appname", but the authentication hashing assumes the /_definst_ still to be present. --- libavformat/rtmpproto.c | 2 ++ 1 file changed, 2 insertions(+)diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 4de20f2..48eed56 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -1612,6 +1612,8 @@ static int do_llnw_auth(RTMPContext *rt, const char *user, const char *nonce) av_md5_update(md5, method, strlen(method)); av_md5_update(md5, ":/", 2); av_md5_update(md5, rt->app, strlen(rt->app)); + if (!strchr(rt->app, '/')) + av_md5_update(md5, "/_definst_", strlen("/_definst_")); av_md5_final(md5, hash); ff_data_to_hex(hashstr2, hash, 16, 1); hashstr2[32] = '\0'; --LGTM but makes one wonder if the client is supposed to append that to app name elsewhere too.
No, it's implicitly handled in the app name parameter of the connect calls. In those cases, the server can obviously figure out what it should be when the string is sent verbatim, but for the auth hashing, it's implicitly assumed to be there (their auth docs even point this out).
// Martin
_______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
