From 624bcb5260182b6e8cf534ad4f0be679770739ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 10 Sep 2014 21:56:38 +0200 Subject: [PATCH] No memmove: done, rm temporary things --- include/polarssl/ssl.h | 17 ----------------- library/ssl_tls.c | 3 +-- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/include/polarssl/ssl.h b/include/polarssl/ssl.h index b5a033d8e..1cfb606c9 100644 --- a/include/polarssl/ssl.h +++ b/include/polarssl/ssl.h @@ -1974,23 +1974,6 @@ static inline int safer_memcmp( const void *a, const void *b, size_t n ) return( diff ); } -/* - * Temporary function while transitionning away from memmove() - * on received DTLS handshake messages - */ -static inline void ssl_hs_rm_dtls_hdr( ssl_context *ssl ) -{ -#if defined(POLARSSL_SSL_PROTO_DTLS) - if( ssl->transport == SSL_TRANSPORT_DATAGRAM ) - { - memmove( ssl->in_msg + 4, ssl->in_msg + 12, ssl->in_hslen - 12 ); - ssl->in_hslen -= 8; - } -#else - (void) ssl; -#endif -} - #ifdef __cplusplus } #endif diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 36e9e4094..2856c6b06 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -2609,8 +2609,7 @@ int ssl_read_record( ssl_context *ssl ) SSL_DEBUG_MSG( 2, ( "=> read record" ) ); - /* Temporarily disabled */ - if( ( 0 ) && ssl->in_hslen != 0 && ssl->in_hslen < ssl->in_msglen ) + if( ssl->in_hslen != 0 && ssl->in_hslen < ssl->in_msglen ) { /* * Get next Handshake message in the current record