From 1847c5fef7dac200a5e3d5aea38950f3382e2625 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 1 Dec 2014 22:09:09 +0800 Subject: [PATCH] ignore the actual length of share key. 2.0.40 --- trunk/src/core/srs_core.hpp | 2 +- trunk/src/rtmp/srs_protocol_handshake.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index faf62502e..266a47f9d 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // current release version #define VERSION_MAJOR 2 #define VERSION_MINOR 0 -#define VERSION_REVISION 39 +#define VERSION_REVISION 40 // server info. #define RTMP_SIG_SRS_KEY "SRS" #define RTMP_SIG_SRS_ROLE "origin/edge server" diff --git a/trunk/src/rtmp/srs_protocol_handshake.cpp b/trunk/src/rtmp/srs_protocol_handshake.cpp index e67c9e9ac..e5a69d719 100644 --- a/trunk/src/rtmp/srs_protocol_handshake.cpp +++ b/trunk/src/rtmp/srs_protocol_handshake.cpp @@ -532,7 +532,11 @@ namespace _srs_internal srs_error("calc s1 key failed. ret=%d", ret); return ret; } - srs_assert(pkey_size == 128); + + // altough the public key is always 128bytes, but the share key maybe not. + // we just ignore the actual key size, but if need to use the key, must use the actual size. + // TODO: FIXME: use the actual key size. + //srs_assert(pkey_size == 128); srs_verbose("calc s1 key success."); char* s1_digest = NULL;