[rtmpdump] [PATCH] Publisher authentication

Howard Chu hyc at highlandsun.com
Fri Jun 18 23:50:24 CEST 2010


Sergiy wrote:
> Hi all.
>
> I need publisher authentication for my application with login/password
> for rtmp-server (like in fme),
> so I created dirty hack to add adboe-auth to librtmp.
> It tested with fms and rtmpd and seems to work.

Thanks.

Your patch only works with OpenSSL, we'll need to rewrite a fair bit of it to 
make it portable across GnuTLS and PolarSSL too.

I don't have time to look into that right now.

> librtmp reconnect to server 3 times:
> 1st connection - get 403 error (server need auth).
> 2nd connection - publisher gives username and receive error again (but
> server responses with salt&  opaque)
> 3rd connection - publisher sent challenge&  response for auth, and if
> all ok, server sent "Connection succeeded".
>
> But it still need to fix memory freeing.

And I don't want to commit patches that introduce memory leaks.

> Here is samples of my startup (like in ffmpeg's rtmp-output):
> ./sample/crusherRTMP -i 1 -s 720x576 -b 1000000 -a 96000 -d \
> "rtmp://192.168.1.1/live/livestream2
>   flashver=FMLE/3.0\20(compatible;\20FMSc/1.0)
>   pubUser=user  pubPasswd=hackme"

Please fix the leak and put some #ifdef's around your code so that it only 
gets included when OpenSSL is being used, or make it portable to the other two 
crypto libraries. Thanks.


More information about the rtmpdump mailing list