Check that the peer_authenticated flag

Check that the peer has been authenticated in the end
of the handshake.
diff --git a/library/ssl_cli.c b/library/ssl_cli.c
index 08c65d2..4871885 100644
--- a/library/ssl_cli.c
+++ b/library/ssl_cli.c
@@ -4296,7 +4296,7 @@
            break;
 
        case MBEDTLS_SSL_HANDSHAKE_WRAPUP:
-           mbedtls_ssl_handshake_wrapup( ssl );
+           ret = mbedtls_ssl_handshake_wrapup( ssl );
            break;
 
        case MBEDTLS_SSL_INVALID: