From 98d435ef5039390b36511ac14832cadfd4e0e95b Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sun, 26 Dec 2021 18:34:55 +0800 Subject: [PATCH] =?UTF-8?q?Rtmp:=20=E4=BF=AE=E5=A4=8Dopenssl=E6=9C=AA?= =?UTF-8?q?=E5=BC=80=E5=90=AF=E5=AF=BC=E8=87=B4=E7=BC=96=E8=AF=91=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98:=20#1301?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtmp/RtmpProtocol.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Rtmp/RtmpProtocol.cpp b/src/Rtmp/RtmpProtocol.cpp index a5ee61c1..bf5466f0 100644 --- a/src/Rtmp/RtmpProtocol.cpp +++ b/src/Rtmp/RtmpProtocol.cpp @@ -432,6 +432,7 @@ static u_int8_t FPKey[] = { //发送复杂握手c0c1 void RtmpHandshake::create_complex_c0c1() { +#ifdef ENABLE_OPENSSL memcpy(zero, "\x80\x00\x07\x02", 4); //digest随机偏移长度 auto offset_value = rand() % (C1_SCHEMA_SIZE - C1_OFFSET_SIZE - C1_DIGEST_SIZE); @@ -446,6 +447,7 @@ void RtmpHandshake::create_complex_c0c1() { auto digest_value = openssl_HMACsha256(FPKey, C1_FPKEY_SIZE, str.data(), str.size()); //插入摘要 memcpy(random + C1_SCHEMA_SIZE + C1_OFFSET_SIZE + offset_value, digest_value.data(), digest_value.size()); +#endif } void RtmpProtocol::check_C1_Digest(const string &digest,const string &data){