mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-05-11 14:38:17 +02:00
Introduce getter function for renego_status
While not strictly related to this PR, this change improves readability in some resumption-related runtime conditions that previously had rather ugly preprocessor directives in the middle of already complex predicates.
This commit is contained in:
@@ -1127,4 +1127,15 @@ static inline int mbedtls_ssl_handshake_get_resume(
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline int mbedtls_ssl_get_renego_status(
|
||||
const mbedtls_ssl_context *ssl )
|
||||
{
|
||||
#if defined(MBEDTLS_SSL_RENEGOTIATION)
|
||||
return( ssl->renego_status );
|
||||
#else
|
||||
(void) ssl;
|
||||
return( MBEDTLS_SSL_INITIAL_HANDSHAKE );
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* ssl_internal.h */
|
||||
|
||||
Reference in New Issue
Block a user