Prescribe inlining of tls_prf_generic()

The NO_INLINE annotation of tls_prf_sha256() and tls_prf_sha384() from
the last commit surprisingly had an influence on ARMC5 compilation in
that tls_prf_generic() was no longer automatically inlined into
tls_prf_sha256() if only the latter was enabled (and is the point
where tls_prf_generic() is called). This commit forces inlining
of tls_prf_generic() in this case.
This commit is contained in:
Hanno Becker 2019-08-16 14:34:52 +01:00
parent 2793f740a9
commit f6cc7423aa

View file

@ -748,7 +748,12 @@ MBEDTLS_NO_INLINE static int tls1_prf( const unsigned char *secret, size_t slen,
#endif /* MBEDTLS_SSL_PROTO_TLS1) || MBEDTLS_SSL_PROTO_TLS1_1 */ #endif /* MBEDTLS_SSL_PROTO_TLS1) || MBEDTLS_SSL_PROTO_TLS1_1 */
#if defined(MBEDTLS_SSL_PROTO_TLS1_2) #if defined(MBEDTLS_SSL_PROTO_TLS1_2)
static int tls_prf_generic( mbedtls_md_type_t md_type, #if !( defined(MBEDTLS_SHA256_C) && defined(MBEDTLS_SHA512_C) )
MBEDTLS_ALWAYS_INLINE static inline
#else
static
#endif
int tls_prf_generic( mbedtls_md_type_t md_type,
const unsigned char *secret, size_t slen, const unsigned char *secret, size_t slen,
const char *label, const char *label,
const unsigned char *random, size_t rlen, const unsigned char *random, size_t rlen,