mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03: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
4 changed files with 18 additions and 15 deletions
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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue