Revert a part of the sensitive information duplication changes

Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
diff --git a/library/ssl_cli.c b/library/ssl_cli.c
index 5b47c0a..58cbd87 100644
--- a/library/ssl_cli.c
+++ b/library/ssl_cli.c
@@ -2796,14 +2796,10 @@
     volatile int ret = 0;
     unsigned char *p;
     unsigned char *end;
-    volatile unsigned char *buf_dup = buf;
-    volatile size_t buflen_dup = buflen;
 
     mbedtls_ssl_ciphersuite_handle_t ciphersuite_info =
         mbedtls_ssl_handshake_get_ciphersuite( ssl->handshake );
 
-    ((void) buf_dup);
-    ((void) buflen_dup);
     p   = buf + mbedtls_ssl_hs_hdr_len( ssl );
     end = buf + buflen;
 
@@ -3104,7 +3100,7 @@
         {
             mbedtls_platform_random_delay();
 
-            if( ret == 0 && buf_dup == buf && buflen_dup == buflen )
+            if( ret == 0 )
             {
 #if !defined(MBEDTLS_SSL_KEEP_PEER_CERTIFICATE)
                 /* We don't need the peer's public key anymore. Free it,
@@ -3587,10 +3583,7 @@
 {
     int ret;
     unsigned char *p, *end;
-    volatile unsigned char *buf_dup = buf;
-    volatile size_t buflen_dup = buflen;
     size_t n;
-
     mbedtls_ssl_ciphersuite_handle_t ciphersuite_info =
         mbedtls_ssl_handshake_get_ciphersuite( ssl->handshake );
 
@@ -3873,12 +3866,8 @@
     }
 
     *olen = p - buf;
-    /* Secure against buffer substitution */
-    if( buf_dup == buf && buflen_dup == buflen )
-    {
-       return( 0 );
-    }
-    return( MBEDTLS_ERR_PLATFORM_FAULT_DETECTED );
+
+    return( 0 );
 }
 
 static int ssl_out_client_key_exchange_postprocess( mbedtls_ssl_context *ssl )