mirror of https://git.ffmpeg.org/ffmpeg.git
rtmpproto: Fix limelight authentication with abbreviated app names
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. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
cb8f70c96e
commit
6454c44f9f
|
@ -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, method, strlen(method));
|
||||||
av_md5_update(md5, ":/", 2);
|
av_md5_update(md5, ":/", 2);
|
||||||
av_md5_update(md5, rt->app, strlen(rt->app));
|
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);
|
av_md5_final(md5, hash);
|
||||||
ff_data_to_hex(hashstr2, hash, 16, 1);
|
ff_data_to_hex(hashstr2, hash, 16, 1);
|
||||||
hashstr2[32] = '\0';
|
hashstr2[32] = '\0';
|
||||||
|
|
Loading…
Reference in New Issue