/* Note: If any of the following macros fail, the error return happens within the macro. */ xc_status_t gtmcrypt_close() { GC_VERIFY_INITED; gtmcrypt_err_string[0] = '\0'; /* discard any previously recorded error messages */ gc_pk_scrub_passwd(); gc_dbk_scrub_entries(); gtmcrypt_inited = FALSE; return GC_SUCCESS; }
/* * Disable encryption and discard any sensitive data in memory. * * Returns: 0 if the operation succeeded; -1 otherwise. */ gtm_status_t gtmcrypt_close(void) { int status; GC_VERIFY_INITED; /* Discard any previously recorded error messages. */ gtmcrypt_err_string[0] = '\0'; gc_pk_scrub_passwd(); status = gtm_keystore_cleanup_all(); gtmcrypt_inited = FALSE; return status; }