src/lib/openssl.c
int cleanup_crypto (void)
{
   /*
    * Ensure that we've actually been initialized; Doing this here decreases the
    * complexity of client's termination/cleanup code.
    */
   if (!crypto_initialized) {
      return 0;
   }

   if (!openssl_save_prng()) {
      Jmsg0(NULL, M_ERROR, 0, _("Failed to save OpenSSL PRNG\n"));
   }

#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
   openssl_cleanup_threads();

   /* Free libssl and libcrypto error strings */
   ERR_free_strings();

   /* Free all ciphers and digests */
   EVP_cleanup();

   /* Free memory used by PRNG */
   RAND_cleanup();
#endif

   crypto_initialized = false;

   return 0;
}
/*
 * Perform global cleanup of OpenSSL
 * All cryptographic operations must be completed before calling this function.
 * This function is not thread safe.
 *  Returns: 0 on success
 *           errno on failure
 */
Perform global cleanup of OpenSSL
All cryptographic operations must be completed before calling this function.
This function is not thread safe.
Returns: 0 on success
errno on failure
Perform global cleanup of OpenSSL All cryptographic operations must be completed before calling this function . This function is not thread safe . Returns : 0 on success errno on failure
int cleanup_crypto (void)
{
   if (!crypto_initialized) {
      return 0;
   }
   if (!openssl_save_prng()) {
      Jmsg0(NULL, M_ERROR, 0, _("Failed to save OpenSSL PRNG\n"));
   }
#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
   openssl_cleanup_threads();
   ERR_free_strings();
   EVP_cleanup();
   RAND_cleanup();
#endif
   crypto_initialized = false;
   return 0;
}
int cleanup_crypto ( void ) { if ( ! crypto_initialized ) { return 0 ; } if ( ! openssl_save_prng ( ) ) { Jmsg0 ( NULL , M_ERROR , 0 , _ ( " \n " ) ) ; } #if ( OPENSSL_VERSION_NUMBER < 0x10100000L ) || defined ( LIBRESSL_VERSION_NUMBER ) openssl_cleanup_threads ( ) ; ERR_free_strings ( ) ; EVP_cleanup ( ) ; RAND_cleanup ( ) ; #endif crypto_initialized = false ; return 0 ; }
Perform global cleanup of OpenSSL
 All cryptographic operations must be completed before calling this function.
Perform global cleanup of OpenSSL All cryptographic operations must be completed before calling this function .
/*
    * Ensure that we've actually been initialized; Doing this here decreases the
    * complexity of client's termination/cleanup code.
    */ /* Free libssl and libcrypto error strings */ /* Free all ciphers and digests */ /* Free memory used by PRNG */