mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-29 09:14:14 +01:00
Mutex call in x509_crt.c depended on PTHREAD specific instead of generic
threading
This commit is contained in:
parent
247b487d61
commit
9eae7aae80
@ -18,6 +18,7 @@ Bugfix
|
|||||||
* ecp_gen_keypair() does more tries to prevent failure because of
|
* ecp_gen_keypair() does more tries to prevent failure because of
|
||||||
statistics
|
statistics
|
||||||
* Fix buf in RSA PKCS#1 v1.5 "reversed" operations
|
* Fix buf in RSA PKCS#1 v1.5 "reversed" operations
|
||||||
|
* Threading in x509_crt depended on PTHREAD instead of generic
|
||||||
|
|
||||||
= PolarSSL 1.3.4 released on 2014-01-27
|
= PolarSSL 1.3.4 released on 2014-01-27
|
||||||
Features
|
Features
|
||||||
|
@ -952,7 +952,7 @@ int x509_crt_parse_file( x509_crt *chain, const char *path )
|
|||||||
return( ret );
|
return( ret );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(POLARSSL_THREADING_PTHREAD)
|
#if defined(POLARSSL_THREADING_C)
|
||||||
static threading_mutex_t readdir_mutex = PTHREAD_MUTEX_INITIALIZER;
|
static threading_mutex_t readdir_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1020,7 +1020,7 @@ int x509_crt_parse_path( x509_crt *chain, const char *path )
|
|||||||
if( dir == NULL)
|
if( dir == NULL)
|
||||||
return( POLARSSL_ERR_X509_FILE_IO_ERROR );
|
return( POLARSSL_ERR_X509_FILE_IO_ERROR );
|
||||||
|
|
||||||
#if defined(POLARSSL_THREADING_PTHREAD)
|
#if defined(POLARSSL_THREADING_C)
|
||||||
if( ( ret = polarssl_mutex_lock( &readdir_mutex ) ) != 0 )
|
if( ( ret = polarssl_mutex_lock( &readdir_mutex ) ) != 0 )
|
||||||
return( ret );
|
return( ret );
|
||||||
#endif
|
#endif
|
||||||
@ -1050,7 +1050,7 @@ int x509_crt_parse_path( x509_crt *chain, const char *path )
|
|||||||
closedir( dir );
|
closedir( dir );
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
#if defined(POLARSSL_THREADING_PTHREAD)
|
#if defined(POLARSSL_THREADING_C)
|
||||||
if( polarssl_mutex_unlock( &readdir_mutex ) != 0 )
|
if( polarssl_mutex_unlock( &readdir_mutex ) != 0 )
|
||||||
ret = POLARSSL_ERR_THREADING_MUTEX_ERROR;
|
ret = POLARSSL_ERR_THREADING_MUTEX_ERROR;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user