diff --git a/plugins/obs-outputs/librtmp/rtmp.c b/plugins/obs-outputs/librtmp/rtmp.c index 81ab5c8628eb58ca5d1a3be9aea53a30ed7fac08..119bb625929b5f52fd3d2f7cb09e061ebd89d998 100644 --- a/plugins/obs-outputs/librtmp/rtmp.c +++ b/plugins/obs-outputs/librtmp/rtmp.c @@ -2583,7 +2583,7 @@ b64enc(const unsigned char *input, int length, char *output, int maxsize) #if defined(USE_MBEDTLS) typedef mbedtls_md5_context MD5_CTX; -#if MBEDTLS_VERSION_NUMBER >= 0x02040000 +#if MBEDTLS_VERSION_NUMBER >= 0x02070000 #define MD5_Init(ctx) mbedtls_md5_init(ctx); mbedtls_md5_starts_ret(ctx) #define MD5_Update(ctx,data,len) mbedtls_md5_update_ret(ctx,(unsigned char *)data,len) #define MD5_Final(dig,ctx) mbedtls_md5_finish_ret(ctx,dig); mbedtls_md5_free(ctx) diff --git a/plugins/obs-outputs/librtmp/rtmp.h b/plugins/obs-outputs/librtmp/rtmp.h index 0441fac8e65347344717c4893dfa447800d6cd55..a4b5355c2fb18aee42cd583db6f7ebf1213a46f1 100644 --- a/plugins/obs-outputs/librtmp/rtmp.h +++ b/plugins/obs-outputs/librtmp/rtmp.h @@ -156,11 +156,6 @@ typedef struct tls_ctx #define TLS_shutdown(s) gnutls_bye(s, GNUTLS_SHUT_RDWR) #define TLS_close(s) gnutls_deinit(s) -#elif defined(USE_ONLY_MD5) -#include "md5.h" -#include "cencode.h" -#define MD5_DIGEST_LENGTH 16 - #else /* USE_OPENSSL */ #define TLS_CTX SSL_CTX * #define TLS_client(ctx,s) s = SSL_new(ctx) @@ -173,6 +168,10 @@ typedef struct tls_ctx #define TLS_close(s) SSL_free(s) #endif +#elif defined(USE_ONLY_MD5) +#include "md5.h" +#include "cencode.h" +#define MD5_DIGEST_LENGTH 16 #endif #ifdef __cplusplus