mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-11 15:55:36 +00:00
Re-implement mbedtls_ssl_{in/out}_hdr_len() via in/out pointers
This commit is contained in:
parent
4339576208
commit
ccc2456db9
|
@ -877,28 +877,12 @@ void mbedtls_ssl_read_version( int *major, int *minor, int transport,
|
|||
|
||||
static inline size_t mbedtls_ssl_in_hdr_len( const mbedtls_ssl_context *ssl )
|
||||
{
|
||||
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
||||
if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM )
|
||||
{
|
||||
return( 13 );
|
||||
}
|
||||
#else
|
||||
((void) ssl);
|
||||
#endif
|
||||
return( 5 );
|
||||
return( (size_t) ( ssl->in_iv - ssl->in_hdr ) );
|
||||
}
|
||||
|
||||
static inline size_t mbedtls_ssl_out_hdr_len( const mbedtls_ssl_context *ssl )
|
||||
{
|
||||
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
||||
if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM )
|
||||
{
|
||||
return( 13 );
|
||||
}
|
||||
#else
|
||||
((void) ssl);
|
||||
#endif
|
||||
return( 5 );
|
||||
return( (size_t) ( ssl->out_iv - ssl->out_hdr ) );
|
||||
}
|
||||
|
||||
static inline size_t mbedtls_ssl_hs_hdr_len( const mbedtls_ssl_context *ssl )
|
||||
|
|
Loading…
Reference in a new issue