Esempio n. 1
0
int async_init(void)
{
    if (!CRYPTO_THREAD_init_local(&ctxkey, NULL))
        return 0;

    if (!CRYPTO_THREAD_init_local(&poolkey, NULL)) {
        CRYPTO_THREAD_cleanup_local(&ctxkey);
        return 0;
    }

    return 1;
}
Esempio n. 2
0
static void ossl_init_base(void)
{
#ifdef OPENSSL_INIT_DEBUG
    fprintf(stderr, "OPENSSL_INIT: ossl_init_base: Setting up stop handlers\n");
#endif
    /*
     * We use a dummy thread local key here. We use the destructor to detect
     * when the thread is going to stop (where that feature is available)
     */
    CRYPTO_THREAD_init_local(&threadstopkey, ossl_init_thread_stop_wrap);
#ifndef OPENSSL_SYS_UEFI
    atexit(OPENSSL_cleanup);
#endif
    init_lock = CRYPTO_THREAD_lock_new();
    OPENSSL_cpuid_setup();
    base_inited = 1;
}
Esempio n. 3
0
File: err.c Progetto: AndyUI/openssl
static void err_do_init(void)
{
    CRYPTO_THREAD_init_local(&err_thread_local, NULL);
}