aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-03-09 10:35:53 +0000
committerMatt Caswell <matt@openssl.org>2016-03-09 12:41:39 +0000
commit2e52e7df518d80188c865ea3f7bb3526d14b0c08 (patch)
tree880dbaa15521723b5c2cd35acbbf51ea9384e66c /apps
parent4fc4faa7a79c71223f326396b79af34d37da6615 (diff)
downloadopenssl-2e52e7df518d80188c865ea3f7bb3526d14b0c08.tar.gz
Remove the old threading API
All OpenSSL code has now been transferred to use the new threading API, so the old one is no longer used and can be removed. We provide some compat macros for removed functions which are all no-ops. There is now no longer a need to set locking callbacks!! Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'apps')
-rw-r--r--apps/openssl.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/apps/openssl.c b/apps/openssl.c
index 7783cc48c1..e0694fc3b4 100644
--- a/apps/openssl.c
+++ b/apps/openssl.c
@@ -207,55 +207,6 @@ static char *make_config_name()
return p;
}
-static void lock_dbg_cb(int mode, int type, const char *file, int line)
-{
- static int modes[CRYPTO_NUM_LOCKS];
- const char *errstr = NULL;
- int rw = mode & (CRYPTO_READ | CRYPTO_WRITE);
-
- if (rw != CRYPTO_READ && rw != CRYPTO_WRITE) {
- errstr = "invalid mode";
- goto err;
- }
-
- if (type < 0 || type >= CRYPTO_NUM_LOCKS) {
- errstr = "type out of bounds";
- goto err;
- }
-
- if (mode & CRYPTO_LOCK) {
- if (modes[type]) {
- errstr = "already locked";
- /* must not happen in a single-threaded program --> deadlock! */
- goto err;
- }
- modes[type] = rw;
- } else if (mode & CRYPTO_UNLOCK) {
- if (!modes[type]) {
- errstr = "not locked";
- goto err;
- }
-
- if (modes[type] != rw) {
- errstr = (rw == CRYPTO_READ) ?
- "CRYPTO_r_unlock on write lock" :
- "CRYPTO_w_unlock on read lock";
- }
-
- modes[type] = 0;
- } else {
- errstr = "invalid mode";
- goto err;
- }
-
- err:
- if (errstr) {
- BIO_printf(bio_err,
- "openssl (lock_dbg_cb): %s (mode=%d, type=%d) at %s:%d\n",
- errstr, mode, type, file, line);
- }
-}
-
#if defined( OPENSSL_SYS_VMS)
extern char **copy_argv(int *argc, char **argv);
#endif
@@ -288,7 +239,6 @@ int main(int argc, char *argv[])
if (p != NULL && strcmp(p, "on") == 0)
CRYPTO_set_mem_debug(1);
CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
- CRYPTO_set_locking_callback(lock_dbg_cb);
if (getenv("OPENSSL_FIPS")) {
#ifdef OPENSSL_FIPS