Server: enforce renegotiation

This commit is contained in:
Manuel Pégourié-Gonnard 2013-10-30 16:41:45 +01:00
parent 9c1e1898b6
commit 6d8404d6ba
3 changed files with 15 additions and 1 deletions

View file

@ -967,7 +967,12 @@ reset:
if( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE )
{
printf( " failed\n ! ssl_read returned %d\n\n", ret );
goto exit;
/* Unexpected message probably means client didn't renegotiate */
if( ret == POLARSSL_ERR_SSL_UNEXPECTED_MESSAGE )
goto reset;
else
goto exit;
}
}