diff options
author | Manuel Pégourié-Gonnard <mpg2@elzevir.fr> | 2015-10-05 17:31:05 +0100 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg2@elzevir.fr> | 2015-10-05 17:31:05 +0100 |
commit | 01978bfe635fbef65c1ef64a2e86a85b59cf3fd1 (patch) | |
tree | 3c86130cc50be7ae88e94ecf1ed8be0a543e978a | |
parent | ac4461f783ea526c9a57b1c88702a1dbb2da6076 (diff) | |
parent | cfd1ba9f7ca45159ef209e0ce981160cf18d8cda (diff) | |
download | mbedtls-01978bfe635fbef65c1ef64a2e86a85b59cf3fd1.zip mbedtls-01978bfe635fbef65c1ef64a2e86a85b59cf3fd1.tar.gz mbedtls-01978bfe635fbef65c1ef64a2e86a85b59cf3fd1.tar.bz2 |
Merge branch 'polarssl-1.2' into polarssl-1.2-restricted
* polarssl-1.2:
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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | include/polarssl/cipher.h | 9 | ||||
-rw-r--r-- | include/polarssl/config.h | 3 | ||||
-rw-r--r-- | include/polarssl/md.h | 9 | ||||
-rw-r--r-- | include/polarssl/pkcs11.h | 9 | ||||
-rw-r--r-- | include/polarssl/ssl.h | 9 | ||||
-rw-r--r-- | library/net.c | 2 |
7 files changed, 20 insertions, 26 deletions
@@ -26,6 +26,11 @@ Security unless you allow third parties to pick trust CAs for client auth. Found by 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 * ssl_set_hostname() now rejects host names longer that 255 bytes (maximum defined by RFC 1035) diff --git a/include/polarssl/cipher.h b/include/polarssl/cipher.h index e78f8d1..d50cb74 100644 --- a/include/polarssl/cipher.h +++ b/include/polarssl/cipher.h @@ -29,13 +29,10 @@ #include <string.h> -#if defined(_MSC_VER) && !defined(inline) -#define inline _inline -#else -#if defined(__ARMCC_VERSION) && !defined(inline) +#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \ + !defined(inline) && !defined(__cplusplus) #define inline __inline -#endif /* __ARMCC_VERSION */ -#endif /*_MSC_VER */ +#endif #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. */ diff --git a/include/polarssl/config.h b/include/polarssl/config.h index 3a18f8a..b7d8b6b 100644 --- a/include/polarssl/config.h +++ b/include/polarssl/config.h @@ -331,8 +331,9 @@ * If set, the X509 parser will not break-off when parsing an X509 certificate * and encountering an unknown critical extension. * - * Uncomment to prevent an error. + * \warning Depending on your PKI use, enabling this can be a security risk! * + * Uncomment to prevent an error. #define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION */ diff --git a/include/polarssl/md.h b/include/polarssl/md.h index e94f9be..ae38aad 100644 --- a/include/polarssl/md.h +++ b/include/polarssl/md.h @@ -28,13 +28,10 @@ #include <string.h> -#if defined(_MSC_VER) && !defined(inline) -#define inline _inline -#else -#if defined(__ARMCC_VERSION) && !defined(inline) +#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \ + !defined(inline) && !defined(__cplusplus) #define inline __inline -#endif /* __ARMCC_VERSION */ -#endif /*_MSC_VER */ +#endif #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. */ diff --git a/include/polarssl/pkcs11.h b/include/polarssl/pkcs11.h index aefdbf2..3b07c84 100644 --- a/include/polarssl/pkcs11.h +++ b/include/polarssl/pkcs11.h @@ -34,13 +34,10 @@ #include <pkcs11-helper-1.0/pkcs11h-certificate.h> -#if defined(_MSC_VER) && !defined(inline) -#define inline _inline -#else -#if defined(__ARMCC_VERSION) && !defined(inline) +#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \ + !defined(inline) && !defined(__cplusplus) #define inline __inline -#endif /* __ARMCC_VERSION */ -#endif /*_MSC_VER */ +#endif /** * Context for PKCS #11 private keys. diff --git a/include/polarssl/ssl.h b/include/polarssl/ssl.h index 7aad9f9..69436c9 100644 --- a/include/polarssl/ssl.h +++ b/include/polarssl/ssl.h @@ -43,13 +43,10 @@ #include "zlib.h" #endif -#if defined(_MSC_VER) && !defined(inline) -#define inline _inline -#else -#if defined(__ARMCC_VERSION) && !defined(inline) +#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \ + !defined(inline) && !defined(__cplusplus) #define inline __inline -#endif /* __ARMCC_VERSION */ -#endif /*_MSC_VER */ +#endif /* * SSL Error codes diff --git a/library/net.c b/library/net.c index 0e5edc0..2685d6a 100644 --- a/library/net.c +++ b/library/net.c @@ -268,7 +268,7 @@ int net_accept( int bind_fd, int *client_fd, void *client_ip ) struct sockaddr_in client_addr; #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 ); #else int n = (int) sizeof( client_addr ); |