obs-outputs: Fix mbedtls use of deprecated functions

mbedtls_md5_starts(), mbedtls_md5_update() and mbedtls_md5_finish()
have been marked deprecated since mbedtls version 2.7 and may go
away in the future.

These function have been superseded by versions with a return
value. They are suffixed with "_ret". We do not actually check
return values.

Also the header "mbedtls/net.h" has been superseded by
"mbedtls/net_sockets.h".
master
Florian Zwoch 2020-01-06 21:30:03 +01:00 committed by Florian Zwoch
parent 16d3750846
commit 2699bbbd77
2 changed files with 4 additions and 4 deletions

View File

@ -2696,9 +2696,9 @@ b64enc(const unsigned char *input, int length, char *output, int maxsize)
#if defined(USE_MBEDTLS) #if defined(USE_MBEDTLS)
typedef mbedtls_md5_context MD5_CTX; typedef mbedtls_md5_context MD5_CTX;
#define MD5_Init(ctx) mbedtls_md5_init(ctx); mbedtls_md5_starts(ctx) #define MD5_Init(ctx) mbedtls_md5_init(ctx); mbedtls_md5_starts_ret(ctx)
#define MD5_Update(ctx,data,len) mbedtls_md5_update(ctx,(unsigned char *)data,len) #define MD5_Update(ctx,data,len) mbedtls_md5_update_ret(ctx,(unsigned char *)data,len)
#define MD5_Final(dig,ctx) mbedtls_md5_finish(ctx,dig); mbedtls_md5_free(ctx) #define MD5_Final(dig,ctx) mbedtls_md5_finish_ret(ctx,dig); mbedtls_md5_free(ctx)
#elif defined(USE_POLARSSL) #elif defined(USE_POLARSSL)
#define MD5_CTX md5_context #define MD5_CTX md5_context

View File

@ -82,7 +82,7 @@
#if defined(USE_MBEDTLS) #if defined(USE_MBEDTLS)
#include <mbedtls/version.h> #include <mbedtls/version.h>
#include <mbedtls/net.h> #include <mbedtls/net_sockets.h>
#include <mbedtls/ssl.h> #include <mbedtls/ssl.h>
#include <mbedtls/ctr_drbg.h> #include <mbedtls/ctr_drbg.h>
#include <mbedtls/entropy.h> #include <mbedtls/entropy.h>