mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Move ssl_ep_len() to public namespace
This commit is contained in:
@ -1063,6 +1063,18 @@ int mbedtls_ssl_decrypt_buf( mbedtls_ssl_context const *ssl,
|
||||
mbedtls_ssl_transform *transform,
|
||||
mbedtls_record *rec );
|
||||
|
||||
/* Length of the "epoch" field in the record header */
|
||||
static inline size_t mbedtls_ssl_ep_len( const mbedtls_ssl_context *ssl )
|
||||
{
|
||||
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
||||
if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM )
|
||||
return( 2 );
|
||||
#else
|
||||
((void) ssl);
|
||||
#endif
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
|
||||
void mbedtls_ssl_set_timer( mbedtls_ssl_context *ssl, uint32_t millisecs );
|
||||
#endif /* ssl_internal.h */
|
||||
|
Reference in New Issue
Block a user