Browse Source

Don't set cancel state/type

pthread_cancel() is never called by OpenSSL. Therefore this is no point in
setting the cancel state/type. The functions to set the cancel state/type
are not supported on Android and result in compilation failures. Therefore
we remove these calls completely.

Fixes #19559

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19779)
Matt Caswell 1 year ago
parent
commit
14c593e003
1 changed files with 0 additions and 3 deletions
  1. 0 3
      crypto/thread/arch/thread_posix.c

+ 0 - 3
crypto/thread/arch/thread_posix.c

@@ -22,9 +22,6 @@ static void *thread_start_thunk(void *vthread)
 
     thread = (CRYPTO_THREAD *)vthread;
 
-    pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
-    pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
-
     ret = thread->routine(thread->data);
     ossl_crypto_mutex_lock(thread->statelock);
     CRYPTO_THREAD_SET_STATE(thread, CRYPTO_THREAD_FINISHED);