mirror of
https://github.com/vlang/v.git
synced 2025-08-03 17:57:59 -04:00
thirdparty: improve -cstrict -cc clang-18 -prod
compatibility for programs that do import net.mbedtls
This commit is contained in:
parent
e129ec5b7a
commit
dacc738c96
1
thirdparty/mbedtls/library/pk.c
vendored
1
thirdparty/mbedtls/library/pk.c
vendored
@ -576,6 +576,7 @@ int mbedtls_pk_sign_restartable( mbedtls_pk_context *ctx,
|
||||
if( ( md_alg != MBEDTLS_MD_NONE || hash_len != 0 ) && hash == NULL )
|
||||
return MBEDTLS_ERR_PK_BAD_INPUT_DATA;
|
||||
|
||||
if( ctx == NULL ) return MBEDTLS_ERR_PK_BAD_INPUT_DATA;
|
||||
if( ctx->pk_info == NULL || pk_hashlen_helper( md_alg, &hash_len ) != 0 )
|
||||
return( MBEDTLS_ERR_PK_BAD_INPUT_DATA );
|
||||
|
||||
|
24
thirdparty/mbedtls/library/ssl_misc.h
vendored
24
thirdparty/mbedtls/library/ssl_misc.h
vendored
@ -1582,26 +1582,30 @@ static inline mbedtls_ssl_srtp_profile mbedtls_ssl_check_srtp_profile_value
|
||||
#if defined(MBEDTLS_X509_CRT_PARSE_C)
|
||||
static inline mbedtls_pk_context *mbedtls_ssl_own_key( mbedtls_ssl_context *ssl )
|
||||
{
|
||||
if( NULL == ssl) return NULL;
|
||||
mbedtls_ssl_key_cert *key_cert;
|
||||
|
||||
if( ssl->handshake != NULL && ssl->handshake->key_cert != NULL )
|
||||
if( ssl->handshake != NULL && ssl->handshake->key_cert != NULL ) {
|
||||
key_cert = ssl->handshake->key_cert;
|
||||
else
|
||||
} else {
|
||||
if( NULL == ssl->conf ) return NULL;
|
||||
key_cert = ssl->conf->key_cert;
|
||||
|
||||
return( key_cert == NULL ? NULL : key_cert->key );
|
||||
}
|
||||
if( NULL == key_cert) return NULL;
|
||||
return key_cert->key;
|
||||
}
|
||||
|
||||
static inline mbedtls_x509_crt *mbedtls_ssl_own_cert( mbedtls_ssl_context *ssl )
|
||||
{
|
||||
if( NULL == ssl) return NULL;
|
||||
mbedtls_ssl_key_cert *key_cert;
|
||||
|
||||
if( ssl->handshake != NULL && ssl->handshake->key_cert != NULL )
|
||||
if( ssl->handshake != NULL && ssl->handshake->key_cert != NULL ) {
|
||||
key_cert = ssl->handshake->key_cert;
|
||||
else
|
||||
} else {
|
||||
if( NULL == ssl->conf ) return NULL;
|
||||
key_cert = ssl->conf->key_cert;
|
||||
|
||||
return( key_cert == NULL ? NULL : key_cert->cert );
|
||||
}
|
||||
if( NULL == key_cert) return NULL;
|
||||
return key_cert->cert;
|
||||
}
|
||||
|
||||
/*
|
||||
|
5
thirdparty/mbedtls/library/ssl_tls.c
vendored
5
thirdparty/mbedtls/library/ssl_tls.c
vendored
@ -3774,9 +3774,8 @@ int mbedtls_ssl_handshake( mbedtls_ssl_context *ssl )
|
||||
|
||||
/* Sanity checks */
|
||||
|
||||
if( ssl == NULL || ssl->conf == NULL )
|
||||
return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
|
||||
|
||||
if( NULL == ssl ) return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
|
||||
if( NULL == ssl->conf ) return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
|
||||
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
||||
if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM &&
|
||||
( ssl->f_set_timer == NULL || ssl->f_get_timer == NULL ) )
|
||||
|
3
thirdparty/zip/miniz.h
vendored
3
thirdparty/zip/miniz.h
vendored
@ -5131,8 +5131,7 @@ static int mz_mkdir(const char *pDirname) {
|
||||
#define MZ_MKDIR(d) mkdir(d, 0755)
|
||||
|
||||
#else
|
||||
#pragma message( \
|
||||
"Using fopen, ftello, fseeko, stat() etc. path for file I/O - this path may not support large files.")
|
||||
#pragma message("Using fopen, ftello, fseeko, stat() etc. path for file I/O - this path may not support large files.")
|
||||
#ifndef MINIZ_NO_TIME
|
||||
#include <utime.h>
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user