Latest update
This commit is contained in:
@@ -175,7 +175,10 @@ int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock)
|
||||
return 1;
|
||||
}
|
||||
|
||||
# ifdef OPENSSL_SYS_UNIX
|
||||
# ifndef FIPS_MODE
|
||||
/* TODO(3.0): No fork protection in FIPS module yet! */
|
||||
|
||||
# ifdef OPENSSL_SYS_UNIX
|
||||
static pthread_once_t fork_once_control = PTHREAD_ONCE_INIT;
|
||||
|
||||
static void fork_once_func(void)
|
||||
@@ -183,14 +186,15 @@ static void fork_once_func(void)
|
||||
pthread_atfork(OPENSSL_fork_prepare,
|
||||
OPENSSL_fork_parent, OPENSSL_fork_child);
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
|
||||
int openssl_init_fork_handlers(void)
|
||||
{
|
||||
# ifdef OPENSSL_SYS_UNIX
|
||||
# ifdef OPENSSL_SYS_UNIX
|
||||
if (pthread_once(&fork_once_control, fork_once_func) == 0)
|
||||
return 1;
|
||||
# endif
|
||||
# endif
|
||||
return 0;
|
||||
}
|
||||
# endif /* FIPS_MODE */
|
||||
#endif
|
||||
Reference in New Issue
Block a user