提交 1dc2c6a3 编写于 作者: R Richard Stanway

obs-outputs: Fix mbed TLS build issues

Version test macro was using the wrong version, and the non-crypto
MD5 only code was accidentally moved into an #ifdef which ended up
disabling it.

Fixes https://github.com/obsproject/obs-studio/issues/2426
上级 a0e8adbc
......@@ -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)
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册