mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-23 21:01:03 +00:00
Merge branch 'mbedtls-1.3' into mbedtls-1.3-restricted
* mbedtls-1.3: Fix spurious #endif from previous cherry-pick Fix macroization of inline in C++ Add missing warning in doc Fix compile error in net.c with musl libc
This commit is contained in:
commit
c5934272fc
|
@ -29,6 +29,11 @@ Security
|
||||||
unless you allow third parties to pick trust CAs for client auth. Found by
|
unless you allow third parties to pick trust CAs for client auth. Found by
|
||||||
Guido Vranken, Intelworks.
|
Guido Vranken, Intelworks.
|
||||||
|
|
||||||
|
Bugfix
|
||||||
|
* Fix compile error in net.c with musl libc. Found and patch provided by
|
||||||
|
zhasha (#278).
|
||||||
|
* Fix macroization of 'inline' keywork when building as C++. (#279)
|
||||||
|
|
||||||
Changes
|
Changes
|
||||||
* Added checking of hostname length in ssl_set_hostname() to ensure domain
|
* Added checking of hostname length in ssl_set_hostname() to ensure domain
|
||||||
names are compliant with RFC 1035.
|
names are compliant with RFC 1035.
|
||||||
|
|
|
@ -47,13 +47,10 @@
|
||||||
#define POLARSSL_CIPHER_MODE_STREAM
|
#define POLARSSL_CIPHER_MODE_STREAM
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER) && !defined(inline)
|
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
|
||||||
#define inline _inline
|
!defined(inline) && !defined(__cplusplus)
|
||||||
#else
|
|
||||||
#if defined(__ARMCC_VERSION) && !defined(inline)
|
|
||||||
#define inline __inline
|
#define inline __inline
|
||||||
#endif /* __ARMCC_VERSION */
|
#endif
|
||||||
#endif /*_MSC_VER */
|
|
||||||
|
|
||||||
#define POLARSSL_ERR_CIPHER_FEATURE_UNAVAILABLE -0x6080 /**< The selected feature is not available. */
|
#define POLARSSL_ERR_CIPHER_FEATURE_UNAVAILABLE -0x6080 /**< The selected feature is not available. */
|
||||||
#define POLARSSL_ERR_CIPHER_BAD_INPUT_DATA -0x6100 /**< Bad input parameters to function. */
|
#define POLARSSL_ERR_CIPHER_BAD_INPUT_DATA -0x6100 /**< Bad input parameters to function. */
|
||||||
|
|
|
@ -41,13 +41,10 @@
|
||||||
// Comment out to disable prototype change warnings
|
// Comment out to disable prototype change warnings
|
||||||
#define SHOW_PROTOTYPE_CHANGE_WARNINGS
|
#define SHOW_PROTOTYPE_CHANGE_WARNINGS
|
||||||
|
|
||||||
#if defined(_MSC_VER) && !defined(inline)
|
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
|
||||||
#define inline _inline
|
!defined(inline) && !defined(__cplusplus)
|
||||||
#else
|
|
||||||
#if defined(__ARMCC_VERSION) && !defined(inline)
|
|
||||||
#define inline __inline
|
#define inline __inline
|
||||||
#endif /* __ARMCC_VERSION */
|
#endif
|
||||||
#endif /* _MSC_VER */
|
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
// MSVC does not support #warning
|
// MSVC does not support #warning
|
||||||
|
|
|
@ -1157,6 +1157,8 @@
|
||||||
* If set, the X509 parser will not break-off when parsing an X509 certificate
|
* If set, the X509 parser will not break-off when parsing an X509 certificate
|
||||||
* and encountering an unknown critical extension.
|
* and encountering an unknown critical extension.
|
||||||
*
|
*
|
||||||
|
* \warning Depending on your PKI use, enabling this can be a security risk!
|
||||||
|
*
|
||||||
* Uncomment to prevent an error.
|
* Uncomment to prevent an error.
|
||||||
*/
|
*/
|
||||||
//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
|
//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
|
||||||
|
|
|
@ -28,13 +28,10 @@
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#if defined(_MSC_VER) && !defined(inline)
|
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
|
||||||
#define inline _inline
|
!defined(inline) && !defined(__cplusplus)
|
||||||
#else
|
|
||||||
#if defined(__ARMCC_VERSION) && !defined(inline)
|
|
||||||
#define inline __inline
|
#define inline __inline
|
||||||
#endif /* __ARMCC_VERSION */
|
#endif
|
||||||
#endif /*_MSC_VER */
|
|
||||||
|
|
||||||
#define POLARSSL_ERR_MD_FEATURE_UNAVAILABLE -0x5080 /**< The selected feature is not available. */
|
#define POLARSSL_ERR_MD_FEATURE_UNAVAILABLE -0x5080 /**< The selected feature is not available. */
|
||||||
#define POLARSSL_ERR_MD_BAD_INPUT_DATA -0x5100 /**< Bad input parameters to function. */
|
#define POLARSSL_ERR_MD_BAD_INPUT_DATA -0x5100 /**< Bad input parameters to function. */
|
||||||
|
|
|
@ -38,13 +38,10 @@
|
||||||
|
|
||||||
#include <pkcs11-helper-1.0/pkcs11h-certificate.h>
|
#include <pkcs11-helper-1.0/pkcs11h-certificate.h>
|
||||||
|
|
||||||
#if defined(_MSC_VER) && !defined(inline)
|
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
|
||||||
#define inline _inline
|
!defined(inline) && !defined(__cplusplus)
|
||||||
#else
|
|
||||||
#if defined(__ARMCC_VERSION) && !defined(inline)
|
|
||||||
#define inline __inline
|
#define inline __inline
|
||||||
#endif /* __ARMCC_VERSION */
|
#endif
|
||||||
#endif /*_MSC_VER */
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
|
@ -97,13 +97,10 @@
|
||||||
#define POLARSSL_KEY_EXCHANGE__SOME__ECDHE_ENABLED
|
#define POLARSSL_KEY_EXCHANGE__SOME__ECDHE_ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER) && !defined(inline)
|
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
|
||||||
#define inline _inline
|
!defined(inline) && !defined(__cplusplus)
|
||||||
#else
|
|
||||||
#if defined(__ARMCC_VERSION) && !defined(inline)
|
|
||||||
#define inline __inline
|
#define inline __inline
|
||||||
#endif /* __ARMCC_VERSION */
|
#endif
|
||||||
#endif /*_MSC_VER */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SSL Error codes
|
* SSL Error codes
|
||||||
|
|
|
@ -68,13 +68,10 @@
|
||||||
#define strcasecmp _stricmp
|
#define strcasecmp _stricmp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER) && !defined(inline)
|
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
|
||||||
#define inline _inline
|
!defined(inline) && !defined(__cplusplus)
|
||||||
#else
|
|
||||||
#if defined(__ARMCC_VERSION) && !defined(inline)
|
|
||||||
#define inline __inline
|
#define inline __inline
|
||||||
#endif /* __ARMCC_VERSION */
|
#endif
|
||||||
#endif /*_MSC_VER */
|
|
||||||
|
|
||||||
/* Implementation that should never be optimized out by the compiler */
|
/* Implementation that should never be optimized out by the compiler */
|
||||||
static void polarssl_zeroize( void *v, size_t n ) {
|
static void polarssl_zeroize( void *v, size_t n ) {
|
||||||
|
|
|
@ -32,13 +32,10 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#if defined(_MSC_VER) && !defined(inline)
|
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
|
||||||
#define inline _inline
|
!defined(inline) && !defined(__cplusplus)
|
||||||
#else
|
|
||||||
#if defined(__ARMCC_VERSION) && !defined(inline)
|
|
||||||
#define inline __inline
|
#define inline __inline
|
||||||
#endif /* __ARMCC_VERSION */
|
#endif
|
||||||
#endif /*_MSC_VER */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Conversion macros for embedded constants:
|
* Conversion macros for embedded constants:
|
||||||
|
|
|
@ -428,7 +428,7 @@ int net_accept( int bind_fd, int *client_fd, void *client_ip )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__socklen_t_defined) || defined(_SOCKLEN_T) || \
|
#if defined(__socklen_t_defined) || defined(_SOCKLEN_T) || \
|
||||||
defined(_SOCKLEN_T_DECLARED)
|
defined(_SOCKLEN_T_DECLARED) || defined(__DEFINED_socklen_t)
|
||||||
socklen_t n = (socklen_t) sizeof( client_addr );
|
socklen_t n = (socklen_t) sizeof( client_addr );
|
||||||
#else
|
#else
|
||||||
int n = (int) sizeof( client_addr );
|
int n = (int) sizeof( client_addr );
|
||||||
|
|
Loading…
Reference in a new issue