#include "utils/common.h"
#include "utils/eloop.h"
#include "utils/uuid.h"
+#include "crypto/crypto.h"
#include "crypto/random.h"
#include "crypto/tls.h"
#include "common/version.h"
fst_global_deinit();
+ crypto_unload();
os_program_deinit();
return ret;
struct crypto_ec_key *key,
enum crypto_hash_alg algo);
+/**
+ * crypto_unload - Unload crypto resources
+ *
+ * This function is called just before the process exits to allow dynamic
+ * resource allocations to be freed.
+ */
+void crypto_unload(void);
+
#endif /* CRYPTO_H */
gcry_cipher_close(ctx->dec);
os_free(ctx);
}
+
+
+void crypto_unload(void)
+{
+}
void crypto_global_deinit(void)
{
}
+
+
+void crypto_unload(void)
+{
+}
}
#endif /* CONFIG_MODEXP */
+
+
+void crypto_unload(void)
+{
+}
void crypto_global_deinit(void)
{
}
+
+
+void crypto_unload(void)
+{
+}
{
bin_clear_free(ctx, sizeof(*ctx));
}
+
+
+void crypto_unload(void)
+{
+}
{
return 0;
}
+
+
+void crypto_unload(void)
+{
+}
}
-void openssl_unload_legacy_provider(void)
+static void openssl_unload_legacy_provider(void)
{
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
if (openssl_legacy_provider) {
}
#endif /* CONFIG_ECC */
+
+
+void crypto_unload(void)
+{
+ openssl_unload_legacy_provider();
+}
}
#endif /* CONFIG_ECC */
+
+
+void crypto_unload(void)
+{
+}
tls_openssl_ref_count--;
if (tls_openssl_ref_count == 0) {
- void openssl_unload_legacy_provider(void);
-
#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
(defined(LIBRESSL_VERSION_NUMBER) && \
LIBRESSL_VERSION_NUMBER < 0x20700000L)
tls_global->ocsp_stapling_response = NULL;
os_free(tls_global);
tls_global = NULL;
- openssl_unload_legacy_provider();
}
os_free(data->check_cert_subject);
#include "common.h"
#include "utils/ext_password.h"
#include "common/version.h"
+#include "crypto/crypto.h"
#include "crypto/tls.h"
#include "config.h"
#include "eapol_supp/eapol_supp_sm.h"
else
printf("SUCCESS\n");
+ crypto_unload();
os_program_deinit();
return ret;
#endif /* __linux__ */
#include "common.h"
+#include "crypto/crypto.h"
#include "fst/fst.h"
#include "wpa_supplicant_i.h"
#include "driver_i.h"
#endif /* CONFIG_MATCH_IFACE */
os_free(params.pid_file);
+ crypto_unload();
os_program_deinit();
return exitcode;
#include <assert.h>
#include "common.h"
+#include "crypto/crypto.h"
#include "config.h"
#include "eapol_supp/eapol_supp_sm.h"
#include "eloop.h"
eloop_destroy();
+ crypto_unload();
os_program_deinit();
return ret;