Merge remote-tracking branch 'public/pr/1161' into mbedtls-1.3

* public/pr/1161:
  Address PR review comments
  Backport 1.3:Fix crash when calling `mbedtls_ssl_cache_free` twice
This commit is contained in:
Manuel Pégourié-Gonnard 2017-12-19 11:43:57 +01:00
commit cc3e3b0ace
2 changed files with 4 additions and 0 deletions

View file

@ -38,6 +38,8 @@ Bugfix
* Add a check for invalid private parameters in ecdsa_sign. * Add a check for invalid private parameters in ecdsa_sign.
Reported by Yolan Romailler. Reported by Yolan Romailler.
* Fix word size check in in pk.c to not depend on MBEDTLS_HAVE_INT64. * Fix word size check in in pk.c to not depend on MBEDTLS_HAVE_INT64.
* Fix crash when calling mbedtls_ssl_cache_free() twice. Found by
MilenkoMitrovic, #1104
Changes Changes
* Extend cert_write example program by options to set the CRT version * Extend cert_write example program by options to set the CRT version

View file

@ -324,6 +324,8 @@ void ssl_cache_free( ssl_cache_context *cache )
#if defined(POLARSSL_THREADING_C) #if defined(POLARSSL_THREADING_C)
polarssl_mutex_free( &cache->mutex ); polarssl_mutex_free( &cache->mutex );
#endif #endif
cache->chain = NULL;
} }
#endif /* POLARSSL_SSL_CACHE_C */ #endif /* POLARSSL_SSL_CACHE_C */