1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Fixed warnings in case POLARSSL_X509_PARSE_C is not defined

This commit is contained in:
Paul Bakker
2013-09-15 17:06:49 +02:00
parent de56ca1097
commit 2292d1fad0
5 changed files with 21 additions and 10 deletions

View File

@ -72,14 +72,14 @@ static unsigned int mfl_code_to_length[SSL_MAX_FRAG_LEN_INVALID] =
static int ssl_session_copy( ssl_session *dst, const ssl_session *src )
{
int ret;
ssl_session_free( dst );
memcpy( dst, src, sizeof( ssl_session ) );
#if defined(POLARSSL_X509_PARSE_C)
if( src->peer_cert != NULL )
{
int ret;
if( ( dst->peer_cert = polarssl_malloc( sizeof(x509_cert) ) ) == NULL )
return( POLARSSL_ERR_SSL_MALLOC_FAILED );