/* Global cleanup */ void Curl_nss_cleanup(void) { /* This function isn't required to be threadsafe and this is only done * as a safety feature. */ PR_Lock(nss_initlock); if(initialized) { /* Free references to client certificates held in the SSL session cache. * Omitting this hampers destruction of the security module owning * the certificates. */ SSL_ClearSessionCache(); if(mod && SECSuccess == SECMOD_UnloadUserModule(mod)) { SECMOD_DestroyModule(mod); mod = NULL; } #ifdef HAVE_NSS_INITCONTEXT NSS_ShutdownContext(nss_context); nss_context = NULL; #else /* HAVE_NSS_INITCONTEXT */ NSS_Shutdown(); #endif } PR_Unlock(nss_initlock); PR_DestroyLock(nss_initlock); PR_DestroyLock(nss_crllock); nss_initlock = NULL; initialized = 0; }
void metalink_cleanup(void) { #if defined(USE_NSS) && defined(HAVE_NSS_INITCONTEXT) if(nss_context) { NSS_ShutdownContext(nss_context); nss_context = NULL; } #endif }
void metalink_cleanup(void) { #ifdef HAVE_NSS_CONTEXT if(nss_context) { NSS_ShutdownContext(nss_context); nss_context = NULL; } #endif }
void metalink_cleanup(void) { #ifdef USE_NSS if(nss_context) { NSS_ShutdownContext(nss_context); nss_context = NULL; } #endif }
bool gtkhash_hash_lib_nss_is_supported(const enum hash_func_e id) { struct hash_lib_nss_s data; if (!gtkhash_hash_lib_nss_set_alg(id, &data.alg)) return false; if (G_UNLIKELY(!(data.nss = gtkhash_hash_lib_nss_init_context()))) { g_warning("NSS_InitContext failed (%d)", id); return false; } if (G_UNLIKELY(!(data.pk11 = PK11_CreateDigestContext(data.alg)))) { g_warning("PK11_CreateDigestContext failed (%d)", id); NSS_ShutdownContext(data.nss); return false; } PK11_DestroyContext(data.pk11, PR_TRUE); NSS_ShutdownContext(data.nss); return true; }