From 68bc9b6a6a1de61fed3eea5013c6dd6bc567a491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E6=A5=9A?= <771730766@qq.com> Date: Fri, 15 Dec 2017 17:12:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dandroid=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E4=B8=8D=E8=BF=87=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtmp/RtmpProtocol.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Rtmp/RtmpProtocol.cpp b/src/Rtmp/RtmpProtocol.cpp index 1c0a65ab..8273aa4c 100644 --- a/src/Rtmp/RtmpProtocol.cpp +++ b/src/Rtmp/RtmpProtocol.cpp @@ -39,7 +39,7 @@ static string openssl_HMACsha256(const void *key,unsigned int key_len, std::shared_ptr out(new char[32],[](char *ptr){delete [] ptr;}); unsigned int out_len; -#if defined(WIN32) +#if defined(WIN32) || defined(ANDROID) HMAC_CTX *ctx = HMAC_CTX_new(); HMAC_CTX_reset(ctx); HMAC_Init_ex(ctx, key, key_len, EVP_sha256(), NULL); @@ -54,7 +54,7 @@ static string openssl_HMACsha256(const void *key,unsigned int key_len, HMAC_Update(&ctx, (unsigned char*)data, data_len); HMAC_Final(&ctx, (unsigned char *)out.get(), &out_len); HMAC_CTX_cleanup(&ctx); -#endif // defined(WIN32) +#endif // defined(WIN32) || defined(ANDROID) return string(out.get(),out_len); } #endif //ENABLE_OPENSSL