Loading lib/vtls/mbedtls.c +6 −6 Original line number Diff line number Diff line Loading @@ -72,12 +72,12 @@ static int entropy_init_initialized = 0; static void entropy_init_mutex(mbedtls_entropy_context *ctx) { /* lock 0 = entropy_init_mutex() */ polarsslthreadlock_lock_function(0); Curl_polarsslthreadlock_lock_function(0); if(entropy_init_initialized == 0) { mbedtls_entropy_init(ctx); entropy_init_initialized = 1; } polarsslthreadlock_unlock_function(0); Curl_polarsslthreadlock_unlock_function(0); } /* end of entropy_init_mutex() */ Loading @@ -86,9 +86,9 @@ static int entropy_func_mutex(void *data, unsigned char *output, size_t len) { int ret; /* lock 1 = entropy_func_mutex() */ polarsslthreadlock_lock_function(1); Curl_polarsslthreadlock_lock_function(1); ret = mbedtls_entropy_func(data, output, len); polarsslthreadlock_unlock_function(1); Curl_polarsslthreadlock_unlock_function(1); return ret; } Loading Loading @@ -765,12 +765,12 @@ Curl_mbedtls_connect(struct connectdata *conn, */ int mbedtls_init(void) { return polarsslthreadlock_thread_setup(); return Curl_polarsslthreadlock_thread_setup(); } void mbedtls_cleanup(void) { (void)polarsslthreadlock_thread_cleanup(); (void)Curl_polarsslthreadlock_thread_cleanup(); } #endif /* USE_MBEDTLS */ lib/vtls/polarssl.c +9 −9 Original line number Diff line number Diff line Loading @@ -5,8 +5,8 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 2010 - 2011, Hoi-Ho Chan, <hoiho.chan@gmail.com> * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 2010 - 2011, Hoi-Ho Chan, <hoiho.chan@gmail.com> * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -74,12 +74,12 @@ static int entropy_init_initialized = 0; static void entropy_init_mutex(entropy_context *ctx) { /* lock 0 = entropy_init_mutex() */ polarsslthreadlock_lock_function(0); Curl_polarsslthreadlock_lock_function(0); if(entropy_init_initialized == 0) { entropy_init(ctx); entropy_init_initialized = 1; } polarsslthreadlock_unlock_function(0); Curl_polarsslthreadlock_unlock_function(0); } /* end of entropy_init_mutex() */ Loading @@ -88,9 +88,9 @@ static int entropy_func_mutex(void *data, unsigned char *output, size_t len) { int ret; /* lock 1 = entropy_func_mutex() */ polarsslthreadlock_lock_function(1); Curl_polarsslthreadlock_lock_function(1); ret = entropy_func(data, output, len); polarsslthreadlock_unlock_function(1); Curl_polarsslthreadlock_unlock_function(1); return ret; } Loading Loading @@ -740,14 +740,14 @@ Curl_polarssl_connect(struct connectdata *conn, * return 0 error initializing SSL * return 1 SSL initialized successfully */ int polarssl_init(void) int Curl_polarssl_init(void) { return polarsslthreadlock_thread_setup(); return Curl_polarsslthreadlock_thread_setup(); } void polarssl_cleanup(void) void Curl_polarssl_cleanup(void) { (void)polarsslthreadlock_thread_cleanup(); (void)Curl_polarsslthreadlock_thread_cleanup(); } #endif /* USE_POLARSSL */ lib/vtls/polarssl.h +5 −5 Original line number Diff line number Diff line Loading @@ -7,8 +7,8 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 2010, Hoi-Ho Chan, <hoiho.chan@gmail.com> * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 2010, Hoi-Ho Chan, <hoiho.chan@gmail.com> * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading @@ -27,8 +27,8 @@ #ifdef USE_POLARSSL /* Called on first use PolarSSL, setup threading if supported */ int polarssl_init(void); void polarssl_cleanup(void); int Curl_polarssl_init(void); void Curl_polarssl_cleanup(void); CURLcode Curl_polarssl_connect(struct connectdata *conn, int sockindex); Loading @@ -51,8 +51,8 @@ int Curl_polarssl_shutdown(struct connectdata *conn, int sockindex); #define have_curlssl_ca_path 1 /* API setup for PolarSSL */ #define curlssl_init() polarssl_init() #define curlssl_cleanup() polarssl_cleanup() #define curlssl_init() Curl_polarssl_init() #define curlssl_cleanup() Curl_polarssl_cleanup() #define curlssl_connect Curl_polarssl_connect #define curlssl_connect_nonblocking Curl_polarssl_connect_nonblocking #define curlssl_session_free(x) Curl_polarssl_session_free(x) Loading lib/vtls/polarssl_threadlock.c +5 −5 Original line number Diff line number Diff line Loading @@ -5,8 +5,8 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 2013-2015, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 2010, 2011, Hoi-Ho Chan, <hoiho.chan@gmail.com> * Copyright (C) 2013, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -47,7 +47,7 @@ /* This array will store all of the mutexes available to PolarSSL. */ static POLARSSL_MUTEX_T *mutex_buf = NULL; int polarsslthreadlock_thread_setup(void) int Curl_polarsslthreadlock_thread_setup(void) { int i; int ret; Loading @@ -73,7 +73,7 @@ int polarsslthreadlock_thread_setup(void) return 1; /* OK */ } int polarsslthreadlock_thread_cleanup(void) int Curl_polarsslthreadlock_thread_cleanup(void) { int i; int ret; Loading @@ -100,7 +100,7 @@ int polarsslthreadlock_thread_cleanup(void) return 1; /* OK */ } int polarsslthreadlock_lock_function(int n) int Curl_polarsslthreadlock_lock_function(int n) { int ret; #ifdef HAVE_PTHREAD_H Loading @@ -125,7 +125,7 @@ int polarsslthreadlock_lock_function(int n) return 1; /* OK */ } int polarsslthreadlock_unlock_function(int n) int Curl_polarsslthreadlock_unlock_function(int n) { int ret; #ifdef HAVE_PTHREAD_H Loading lib/vtls/polarssl_threadlock.h +9 −9 Original line number Diff line number Diff line Loading @@ -7,8 +7,8 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 2013-2015, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 2010, Hoi-Ho Chan, <hoiho.chan@gmail.com> * Copyright (C) 2013, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading @@ -34,17 +34,17 @@ #if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32) int polarsslthreadlock_thread_setup(void); int polarsslthreadlock_thread_cleanup(void); int polarsslthreadlock_lock_function(int n); int polarsslthreadlock_unlock_function(int n); int Curl_polarsslthreadlock_thread_setup(void); int Curl_polarsslthreadlock_thread_cleanup(void); int Curl_polarsslthreadlock_lock_function(int n); int Curl_polarsslthreadlock_unlock_function(int n); #else #define polarsslthreadlock_thread_setup() 1 #define polarsslthreadlock_thread_cleanup() 1 #define polarsslthreadlock_lock_function(x) 1 #define polarsslthreadlock_unlock_function(x) 1 #define Curl_polarsslthreadlock_thread_setup() 1 #define Curl_polarsslthreadlock_thread_cleanup() 1 #define Curl_polarsslthreadlock_lock_function(x) 1 #define Curl_polarsslthreadlock_unlock_function(x) 1 #endif /* USE_THREADS_POSIX || USE_THREADS_WIN32 */ Loading Loading
lib/vtls/mbedtls.c +6 −6 Original line number Diff line number Diff line Loading @@ -72,12 +72,12 @@ static int entropy_init_initialized = 0; static void entropy_init_mutex(mbedtls_entropy_context *ctx) { /* lock 0 = entropy_init_mutex() */ polarsslthreadlock_lock_function(0); Curl_polarsslthreadlock_lock_function(0); if(entropy_init_initialized == 0) { mbedtls_entropy_init(ctx); entropy_init_initialized = 1; } polarsslthreadlock_unlock_function(0); Curl_polarsslthreadlock_unlock_function(0); } /* end of entropy_init_mutex() */ Loading @@ -86,9 +86,9 @@ static int entropy_func_mutex(void *data, unsigned char *output, size_t len) { int ret; /* lock 1 = entropy_func_mutex() */ polarsslthreadlock_lock_function(1); Curl_polarsslthreadlock_lock_function(1); ret = mbedtls_entropy_func(data, output, len); polarsslthreadlock_unlock_function(1); Curl_polarsslthreadlock_unlock_function(1); return ret; } Loading Loading @@ -765,12 +765,12 @@ Curl_mbedtls_connect(struct connectdata *conn, */ int mbedtls_init(void) { return polarsslthreadlock_thread_setup(); return Curl_polarsslthreadlock_thread_setup(); } void mbedtls_cleanup(void) { (void)polarsslthreadlock_thread_cleanup(); (void)Curl_polarsslthreadlock_thread_cleanup(); } #endif /* USE_MBEDTLS */
lib/vtls/polarssl.c +9 −9 Original line number Diff line number Diff line Loading @@ -5,8 +5,8 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 2010 - 2011, Hoi-Ho Chan, <hoiho.chan@gmail.com> * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 2010 - 2011, Hoi-Ho Chan, <hoiho.chan@gmail.com> * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -74,12 +74,12 @@ static int entropy_init_initialized = 0; static void entropy_init_mutex(entropy_context *ctx) { /* lock 0 = entropy_init_mutex() */ polarsslthreadlock_lock_function(0); Curl_polarsslthreadlock_lock_function(0); if(entropy_init_initialized == 0) { entropy_init(ctx); entropy_init_initialized = 1; } polarsslthreadlock_unlock_function(0); Curl_polarsslthreadlock_unlock_function(0); } /* end of entropy_init_mutex() */ Loading @@ -88,9 +88,9 @@ static int entropy_func_mutex(void *data, unsigned char *output, size_t len) { int ret; /* lock 1 = entropy_func_mutex() */ polarsslthreadlock_lock_function(1); Curl_polarsslthreadlock_lock_function(1); ret = entropy_func(data, output, len); polarsslthreadlock_unlock_function(1); Curl_polarsslthreadlock_unlock_function(1); return ret; } Loading Loading @@ -740,14 +740,14 @@ Curl_polarssl_connect(struct connectdata *conn, * return 0 error initializing SSL * return 1 SSL initialized successfully */ int polarssl_init(void) int Curl_polarssl_init(void) { return polarsslthreadlock_thread_setup(); return Curl_polarsslthreadlock_thread_setup(); } void polarssl_cleanup(void) void Curl_polarssl_cleanup(void) { (void)polarsslthreadlock_thread_cleanup(); (void)Curl_polarsslthreadlock_thread_cleanup(); } #endif /* USE_POLARSSL */
lib/vtls/polarssl.h +5 −5 Original line number Diff line number Diff line Loading @@ -7,8 +7,8 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 2010, Hoi-Ho Chan, <hoiho.chan@gmail.com> * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 2010, Hoi-Ho Chan, <hoiho.chan@gmail.com> * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading @@ -27,8 +27,8 @@ #ifdef USE_POLARSSL /* Called on first use PolarSSL, setup threading if supported */ int polarssl_init(void); void polarssl_cleanup(void); int Curl_polarssl_init(void); void Curl_polarssl_cleanup(void); CURLcode Curl_polarssl_connect(struct connectdata *conn, int sockindex); Loading @@ -51,8 +51,8 @@ int Curl_polarssl_shutdown(struct connectdata *conn, int sockindex); #define have_curlssl_ca_path 1 /* API setup for PolarSSL */ #define curlssl_init() polarssl_init() #define curlssl_cleanup() polarssl_cleanup() #define curlssl_init() Curl_polarssl_init() #define curlssl_cleanup() Curl_polarssl_cleanup() #define curlssl_connect Curl_polarssl_connect #define curlssl_connect_nonblocking Curl_polarssl_connect_nonblocking #define curlssl_session_free(x) Curl_polarssl_session_free(x) Loading
lib/vtls/polarssl_threadlock.c +5 −5 Original line number Diff line number Diff line Loading @@ -5,8 +5,8 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 2013-2015, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 2010, 2011, Hoi-Ho Chan, <hoiho.chan@gmail.com> * Copyright (C) 2013, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -47,7 +47,7 @@ /* This array will store all of the mutexes available to PolarSSL. */ static POLARSSL_MUTEX_T *mutex_buf = NULL; int polarsslthreadlock_thread_setup(void) int Curl_polarsslthreadlock_thread_setup(void) { int i; int ret; Loading @@ -73,7 +73,7 @@ int polarsslthreadlock_thread_setup(void) return 1; /* OK */ } int polarsslthreadlock_thread_cleanup(void) int Curl_polarsslthreadlock_thread_cleanup(void) { int i; int ret; Loading @@ -100,7 +100,7 @@ int polarsslthreadlock_thread_cleanup(void) return 1; /* OK */ } int polarsslthreadlock_lock_function(int n) int Curl_polarsslthreadlock_lock_function(int n) { int ret; #ifdef HAVE_PTHREAD_H Loading @@ -125,7 +125,7 @@ int polarsslthreadlock_lock_function(int n) return 1; /* OK */ } int polarsslthreadlock_unlock_function(int n) int Curl_polarsslthreadlock_unlock_function(int n) { int ret; #ifdef HAVE_PTHREAD_H Loading
lib/vtls/polarssl_threadlock.h +9 −9 Original line number Diff line number Diff line Loading @@ -7,8 +7,8 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 2013-2015, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 2010, Hoi-Ho Chan, <hoiho.chan@gmail.com> * Copyright (C) 2013, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading @@ -34,17 +34,17 @@ #if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32) int polarsslthreadlock_thread_setup(void); int polarsslthreadlock_thread_cleanup(void); int polarsslthreadlock_lock_function(int n); int polarsslthreadlock_unlock_function(int n); int Curl_polarsslthreadlock_thread_setup(void); int Curl_polarsslthreadlock_thread_cleanup(void); int Curl_polarsslthreadlock_lock_function(int n); int Curl_polarsslthreadlock_unlock_function(int n); #else #define polarsslthreadlock_thread_setup() 1 #define polarsslthreadlock_thread_cleanup() 1 #define polarsslthreadlock_lock_function(x) 1 #define polarsslthreadlock_unlock_function(x) 1 #define Curl_polarsslthreadlock_thread_setup() 1 #define Curl_polarsslthreadlock_thread_cleanup() 1 #define Curl_polarsslthreadlock_lock_function(x) 1 #define Curl_polarsslthreadlock_unlock_function(x) 1 #endif /* USE_THREADS_POSIX || USE_THREADS_WIN32 */ Loading