diff options
author | Matt Caswell <matt@openssl.org> | 2016-04-04 15:49:21 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-04-13 08:52:33 +0100 |
commit | 7b8cc9b3458ec3f18b4d4d9ca2a72b6b3e3744c8 (patch) | |
tree | da9131b97fb33b3ae50e5d79665a8bdef5eee16c /crypto | |
parent | 22c84afa773559279af928652a2d9f3489cc7d73 (diff) |
Deprecate OBJ_cleanup() and make it a no-op
OBJ_cleanup() should not be called expicitly - we should leave
auto-deinit to clean this up instead.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/asn1/asn_moid.c | 3 | ||||
-rw-r--r-- | crypto/evp/names.c | 4 | ||||
-rw-r--r-- | crypto/include/internal/objects.h | 11 | ||||
-rw-r--r-- | crypto/init.c | 5 | ||||
-rw-r--r-- | crypto/objects/obj_dat.c | 4 |
5 files changed, 20 insertions, 7 deletions
diff --git a/crypto/asn1/asn_moid.c b/crypto/asn1/asn_moid.c index 8198874aa9..ded5d018b4 100644 --- a/crypto/asn1/asn_moid.c +++ b/crypto/asn1/asn_moid.c @@ -63,6 +63,7 @@ #include <openssl/conf.h> #include <openssl/x509.h> #include "internal/asn1_int.h" +#include "internal/objects.h" /* Simple ASN1 OID module: add all objects in a given section */ @@ -92,7 +93,7 @@ static int oid_module_init(CONF_IMODULE *md, const CONF *cnf) static void oid_module_finish(CONF_IMODULE *md) { - OBJ_cleanup(); + obj_cleanup_intern(); } void ASN1_add_oid_module(void) diff --git a/crypto/evp/names.c b/crypto/evp/names.c index 22c725d060..5ef52b43df 100644 --- a/crypto/evp/names.c +++ b/crypto/evp/names.c @@ -58,7 +58,7 @@ #include <stdio.h> #include "internal/cryptlib.h" #include <openssl/evp.h> -#include <openssl/objects.h> +#include <internal/objects.h> #include <openssl/x509.h> #include "internal/evp_int.h" @@ -142,7 +142,7 @@ void evp_cleanup_intern(void) EVP_PBE_cleanup(); if (obj_cleanup_defer == 2) { obj_cleanup_defer = 0; - OBJ_cleanup(); + obj_cleanup_intern(); } OBJ_sigid_free(); } diff --git a/crypto/include/internal/objects.h b/crypto/include/internal/objects.h new file mode 100644 index 0000000000..601294f3f2 --- /dev/null +++ b/crypto/include/internal/objects.h @@ -0,0 +1,11 @@ +/* + * Licensed under the OpenSSL licenses, (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * https://www.openssl.org/source/license.html + * or in the file LICENSE in the source distribution. + */ + +#include <openssl/objects.h> + +void obj_cleanup_intern(void); diff --git a/crypto/init.c b/crypto/init.c index dc24c02693..170d11b91c 100644 --- a/crypto/init.c +++ b/crypto/init.c @@ -67,6 +67,7 @@ #include <internal/engine.h> #include <internal/comp.h> #include <internal/err.h> +#include <internal/objects.h> #include <stdlib.h> #include <assert.h> @@ -468,7 +469,7 @@ void OPENSSL_cleanup(void) fprintf(stderr, "OPENSSL_INIT: OPENSSL_cleanup: " "evp_cleanup_intern()\n"); fprintf(stderr, "OPENSSL_INIT: OPENSSL_cleanup: " - "OBJ_cleanup()\n"); + "obj_cleanup_intern()\n"); #endif /* * Note that cleanup order is important: @@ -489,7 +490,7 @@ void OPENSSL_cleanup(void) bio_sock_cleanup_intern(); #endif evp_cleanup_intern(); - OBJ_cleanup(); + obj_cleanup_intern(); base_inited = 0; } diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c index 21b4187a25..90db56bbd8 100644 --- a/crypto/objects/obj_dat.c +++ b/crypto/objects/obj_dat.c @@ -61,7 +61,7 @@ #include "internal/cryptlib.h" #include <openssl/lhash.h> #include <openssl/asn1.h> -#include <openssl/objects.h> +#include "internal/objects.h" #include <openssl/bn.h> #include "internal/asn1_int.h" #include "obj_lcl.h" @@ -210,7 +210,7 @@ void check_defer(int nid) obj_cleanup_defer = 1; } -void OBJ_cleanup(void) +void obj_cleanup_intern(void) { if (obj_cleanup_defer) { obj_cleanup_defer = 2; |