summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/engine
diff options
context:
space:
mode:
authordoug <>2015-02-07 13:19:15 +0000
committerdoug <>2015-02-07 13:19:15 +0000
commitbd790e322a40e6362231f517d5795d4079eeb2a2 (patch)
tree1f11c8eab9ee5f3f265f1010c299c7fd574d9cdf /src/lib/libcrypto/engine
parentff826d3cb94a579275eb6e97b3cf80ca69016d4b (diff)
downloadopenbsd-bd790e322a40e6362231f517d5795d4079eeb2a2.tar.gz
openbsd-bd790e322a40e6362231f517d5795d4079eeb2a2.tar.bz2
openbsd-bd790e322a40e6362231f517d5795d4079eeb2a2.zip
Delete a lot of #if 0 code in libressl.
There are a few instances where #if 1 is removed but the code remains. Based on the following OpenSSL commits. Some of the commits weren't strictly deletions so they are going to be split up into separate commits. 6f91b017bbb7140f816721141ac156d1b828a6b3 3d47c1d331fdc7574d2275cda1a630ccdb624b08 dfb56425b68314b2b57e17c82c1df42e7a015132 c8fa2356a00cbaada8963f739e5570298311a060 f16a64d11f55c01f56baa62ebf1dec7f8fe718cb 9ccc00ef6ea65567622e40c49aca43f2c6d79cdb 02a938c953b3e1ced71d9a832de1618f907eb96d 75d0ebef2aef7a2c77b27575b8da898e22f3ccd5 d6fbb194095312f4722c81c9362dbd0de66cb656 6f1a93ad111c7dfe36a09a976c4c009079b19ea1 1a5adcfb5edfe23908b350f8757df405b0f5f71f 8de24b792743d11e1d5a0dcd336a49368750c577 a2b18e657ea1a932d125154f4e13ab2258796d90 8e964419603d2478dfb391c66e7ccb2dcc9776b4 32dfde107636ac9bc62a5b3233fe2a54dbc27008 input + ok jsing@, miod@, tedu@
Diffstat (limited to 'src/lib/libcrypto/engine')
-rw-r--r--src/lib/libcrypto/engine/eng_all.c9
-rw-r--r--src/lib/libcrypto/engine/eng_list.c12
-rw-r--r--src/lib/libcrypto/engine/eng_padlock.c8
-rw-r--r--src/lib/libcrypto/engine/tb_store.c25
4 files changed, 9 insertions, 45 deletions
diff --git a/src/lib/libcrypto/engine/eng_all.c b/src/lib/libcrypto/engine/eng_all.c
index 21b76266c7..014bcb132e 100644
--- a/src/lib/libcrypto/engine/eng_all.c
+++ b/src/lib/libcrypto/engine/eng_all.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_all.c,v 1.26 2014/07/10 22:45:57 jsing Exp $ */ 1/* $OpenBSD: eng_all.c,v 1.27 2015/02/07 13:19:15 doug Exp $ */
2/* Written by Richard Levitte <richard@levitte.org> for the OpenSSL 2/* Written by Richard Levitte <richard@levitte.org> for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -66,13 +66,6 @@ ENGINE_load_builtin_engines(void)
66{ 66{
67 /* Some ENGINEs need this */ 67 /* Some ENGINEs need this */
68 OPENSSL_cpuid_setup(); 68 OPENSSL_cpuid_setup();
69#if 0
70 /* There's no longer any need for an "openssl" ENGINE unless, one day,
71 * it is the *only* way for standard builtin implementations to be be
72 * accessed (ie. it would be possible to statically link binaries with
73 * *no* builtin implementations). */
74 ENGINE_load_openssl();
75#endif
76 69
77#ifndef OPENSSL_NO_RSAX 70#ifndef OPENSSL_NO_RSAX
78 ENGINE_load_rsax(); 71 ENGINE_load_rsax();
diff --git a/src/lib/libcrypto/engine/eng_list.c b/src/lib/libcrypto/engine/eng_list.c
index b84504102f..78e978116a 100644
--- a/src/lib/libcrypto/engine/eng_list.c
+++ b/src/lib/libcrypto/engine/eng_list.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_list.c,v 1.15 2014/07/11 08:44:48 jsing Exp $ */ 1/* $OpenBSD: eng_list.c,v 1.16 2015/02/07 13:19:15 doug Exp $ */
2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL 2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -378,14 +378,7 @@ ENGINE_by_id(const char *id)
378 } 378 }
379 } 379 }
380 CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); 380 CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
381#if 0 381
382 if (iterator == NULL) {
383 ENGINEerr(ENGINE_F_ENGINE_BY_ID,
384 ENGINE_R_NO_SUCH_ENGINE);
385 ERR_asprintf_error_data("id=%s", id);
386 }
387 return iterator;
388#else
389 /* EEK! Experimental code starts */ 382 /* EEK! Experimental code starts */
390 if (iterator) 383 if (iterator)
391 return iterator; 384 return iterator;
@@ -415,7 +408,6 @@ notfound:
415 ERR_asprintf_error_data("id=%s", id); 408 ERR_asprintf_error_data("id=%s", id);
416 return NULL; 409 return NULL;
417 /* EEK! Experimental code ends */ 410 /* EEK! Experimental code ends */
418#endif
419} 411}
420 412
421int 413int
diff --git a/src/lib/libcrypto/engine/eng_padlock.c b/src/lib/libcrypto/engine/eng_padlock.c
index 48040db82d..1c86a343df 100644
--- a/src/lib/libcrypto/engine/eng_padlock.c
+++ b/src/lib/libcrypto/engine/eng_padlock.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_padlock.c,v 1.13 2014/10/18 17:20:40 jsing Exp $ */ 1/* $OpenBSD: eng_padlock.c,v 1.14 2015/02/07 13:19:15 doug Exp $ */
2/* 2/*
3 * Support for VIA PadLock Advanced Cryptography Engine (ACE) 3 * Support for VIA PadLock Advanced Cryptography Engine (ACE)
4 * Written by Michal Ludvig <michal@logix.cz> 4 * Written by Michal Ludvig <michal@logix.cz>
@@ -168,9 +168,11 @@ padlock_bind_helper(ENGINE *e)
168 /* Check available features */ 168 /* Check available features */
169 padlock_available(); 169 padlock_available();
170 170
171#if 1 /* disable RNG for now, see commentary in vicinity of RNG code */ 171 /*
172 * RNG is currently disabled for reasons discussed in commentary just
173 * before padlock_rand_bytes function.
174 */
172 padlock_use_rng = 0; 175 padlock_use_rng = 0;
173#endif
174 176
175 /* Generate a nice engine name with available features */ 177 /* Generate a nice engine name with available features */
176 (void) snprintf(padlock_name, sizeof(padlock_name), 178 (void) snprintf(padlock_name, sizeof(padlock_name),
diff --git a/src/lib/libcrypto/engine/tb_store.c b/src/lib/libcrypto/engine/tb_store.c
index 2f0cc004f3..e9ad11ab01 100644
--- a/src/lib/libcrypto/engine/tb_store.c
+++ b/src/lib/libcrypto/engine/tb_store.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tb_store.c,v 1.4 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: tb_store.c,v 1.5 2015/02/07 13:19:15 doug Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2003 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 2003 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -93,29 +93,6 @@ ENGINE_register_all_STORE(void)
93 ENGINE_register_STORE(e); 93 ENGINE_register_STORE(e);
94} 94}
95 95
96/* The following two functions are removed because they're useless. */
97#if 0
98int
99ENGINE_set_default_STORE(ENGINE *e)
100{
101 if (e->store_meth)
102 return engine_table_register(&store_table,
103 engine_unregister_all_STORE, e, &dummy_nid, 1, 1);
104 return 1;
105}
106#endif
107
108#if 0
109/* Exposed API function to get a functional reference from the implementation
110 * table (ie. try to get a functional reference from the tabled structural
111 * references). */
112ENGINE *
113ENGINE_get_default_STORE(void)
114{
115 return engine_table_select(&store_table, dummy_nid);
116}
117#endif
118
119/* Obtains an STORE implementation from an ENGINE functional reference */ 96/* Obtains an STORE implementation from an ENGINE functional reference */
120const STORE_METHOD * 97const STORE_METHOD *
121ENGINE_get_STORE(const ENGINE *e) 98ENGINE_get_STORE(const ENGINE *e)