static void oid_module_finish(CONF_IMODULE *md)
{
- obj_cleanup_int();
}
void ASN1_add_oid_module(void)
(const char *)c);
if (r == 0)
return (0);
- check_defer(c->nid);
r = OBJ_NAME_add(OBJ_nid2ln(c->nid), OBJ_NAME_TYPE_CIPHER_METH,
(const char *)c);
return (r);
r = OBJ_NAME_add(name, OBJ_NAME_TYPE_MD_METH, (const char *)md);
if (r == 0)
return (0);
- check_defer(md->type);
r = OBJ_NAME_add(OBJ_nid2ln(md->type), OBJ_NAME_TYPE_MD_METH,
(const char *)md);
if (r == 0)
OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, name);
if (r == 0)
return (0);
- check_defer(md->pkey_type);
r = OBJ_NAME_add(OBJ_nid2ln(md->pkey_type),
OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, name);
}
OBJ_NAME_cleanup(-1);
EVP_PBE_cleanup();
- if (obj_cleanup_defer == 2) {
- obj_cleanup_defer = 0;
- obj_cleanup_int();
- }
OBJ_sigid_free();
}
#endif
/*
* Note that cleanup order is important:
- * - rand_cleanup_int could call an ENINGE's RAND cleanup function so
+ * - rand_cleanup_int could call an ENGINE's RAND cleanup function so
* must be called before engine_cleanup_int()
* - ENGINEs use CRYPTO_EX_DATA and therefore, must be cleaned up
* before the ex data handlers are wiped in CRYPTO_cleanup_all_ex_data().
* - conf_modules_free_int() can end up in ENGINE code so must be called
* before engine_cleanup_int()
+ * - ENGINEs and additional EVP algorithms might use added OIDs names so
+ * obj_cleanup_int() must be called last
*/
rand_cleanup_int();
conf_modules_free_int();
OPENSSL_free(a);
}
-/*
- * The purpose of obj_cleanup_defer is to avoid int_evp_cleanup() attempting
- * to use freed up OIDs. If necessary the actual freeing up of OIDs is delayed.
- */
-int obj_cleanup_defer = 0;
-
-void check_defer(int nid)
-{
- if (!obj_cleanup_defer && nid >= NUM_NID)
- obj_cleanup_defer = 1;
-}
-
void obj_cleanup_int(void)
{
- if (obj_cleanup_defer) {
- obj_cleanup_defer = 2;
- return;
- }
if (added == NULL)
return;
lh_ADDED_OBJ_set_down_load(added, 0);
int OBJ_add_sigid(int signid, int dig_id, int pkey_id);
void OBJ_sigid_free(void);
-extern int obj_cleanup_defer;
-void check_defer(int nid);
-
/* BEGIN ERROR CODES */
/*
* The following lines are auto generated by the script mkerr.pl. Any changes