Commit 22c84afa authored by Matt Caswell's avatar Matt Caswell
Browse files

Deprecate EVP_cleanup() and make it a no-op



EVP_cleanup() should not be called expicitly - we should leave
auto-deinit to clean this up instead.

Reviewed-by: default avatarTim Hudson <tjh@openssl.org>
Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
parent 62d876ad
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ const EVP_MD *EVP_get_digestbyname(const char *name)
    return (cp);
}

void EVP_cleanup(void)
void evp_cleanup_intern(void)
{
    OBJ_NAME_cleanup(OBJ_NAME_TYPE_CIPHER_METH);
    OBJ_NAME_cleanup(OBJ_NAME_TYPE_MD_METH);
+1 −0
Original line number Diff line number Diff line
@@ -422,3 +422,4 @@ struct evp_pkey_st {

void openssl_add_all_ciphers_internal(void);
void openssl_add_all_digests_internal(void);
void evp_cleanup_intern(void);
+2 −2
Original line number Diff line number Diff line
@@ -466,7 +466,7 @@ void OPENSSL_cleanup(void)
    fprintf(stderr, "OPENSSL_INIT: OPENSSL_cleanup: "
                    "bio_sock_cleanup_intern()\n");
    fprintf(stderr, "OPENSSL_INIT: OPENSSL_cleanup: "
                    "EVP_cleanup()\n");
                    "evp_cleanup_intern()\n");
    fprintf(stderr, "OPENSSL_INIT: OPENSSL_cleanup: "
                    "OBJ_cleanup()\n");
#endif
@@ -488,7 +488,7 @@ void OPENSSL_cleanup(void)
#ifndef OPENSSL_NO_SOCK
    bio_sock_cleanup_intern();
#endif
    EVP_cleanup();
    evp_cleanup_intern();
    OBJ_cleanup();
    base_inited = 0;
}
+2 −2
Original line number Diff line number Diff line
@@ -199,8 +199,8 @@ static void cleanup3_doall(ADDED_OBJ *a)
}

/*
 * The purpose of obj_cleanup_defer is to avoid EVP_cleanup() attempting to
 * use freed up OIDs. If necessary the actual freeing up of OIDs is delayed.
 * The purpose of obj_cleanup_defer is to avoid evp_cleanup_intern() attempting
 * to use freed up OIDs. If necessary the actual freeing up of OIDs is delayed.
 */
int obj_cleanup_defer = 0;

+0 −2
Original line number Diff line number Diff line
@@ -236,8 +236,6 @@ digest name passed on the command line.
 	printf("%02x", md_value[i]);
 printf("\n");

 /* Call this once before exit. */
 EVP_cleanup();
 exit(0);
 }

Loading