summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/engine/eng_int.h
diff options
context:
space:
mode:
authorjsing <>2014-06-22 12:16:28 +0000
committerjsing <>2014-06-22 12:16:28 +0000
commit0fc56655c369d9eb08790eff2fab8d2b47085ab1 (patch)
tree1b822059398c5ad77b6b027187d443c62fdc9361 /src/lib/libcrypto/engine/eng_int.h
parent76145303a8345eadeb8eb36e46f50b090c9770b6 (diff)
downloadopenbsd-0fc56655c369d9eb08790eff2fab8d2b47085ab1.tar.gz
openbsd-0fc56655c369d9eb08790eff2fab8d2b47085ab1.tar.bz2
openbsd-0fc56655c369d9eb08790eff2fab8d2b47085ab1.zip
KNF.
Diffstat (limited to 'src/lib/libcrypto/engine/eng_int.h')
-rw-r--r--src/lib/libcrypto/engine/eng_int.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/lib/libcrypto/engine/eng_int.h b/src/lib/libcrypto/engine/eng_int.h
index 992cba676b..22049fd7fd 100644
--- a/src/lib/libcrypto/engine/eng_int.h
+++ b/src/lib/libcrypto/engine/eng_int.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_int.h,v 1.5 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: eng_int.h,v 1.6 2014/06/22 12:16:28 jsing 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 */
@@ -10,7 +10,7 @@
10 * are met: 10 * are met:
11 * 11 *
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 14 *
15 * 2. Redistributions in binary form must reproduce the above copyright 15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in 16 * notice, this list of conditions and the following disclaimer in
@@ -57,7 +57,7 @@
57 */ 57 */
58/* ==================================================================== 58/* ====================================================================
59 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 59 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
60 * ECDH support in OpenSSL originally developed by 60 * ECDH support in OpenSSL originally developed by
61 * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. 61 * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
62 */ 62 */
63 63
@@ -98,10 +98,9 @@ extern "C" {
98 * order. NB: both the "add" functions assume CRYPTO_LOCK_ENGINE to already be 98 * order. NB: both the "add" functions assume CRYPTO_LOCK_ENGINE to already be
99 * held (in "write" mode). */ 99 * held (in "write" mode). */
100typedef void (ENGINE_CLEANUP_CB)(void); 100typedef void (ENGINE_CLEANUP_CB)(void);
101typedef struct st_engine_cleanup_item 101typedef struct st_engine_cleanup_item {
102 {
103 ENGINE_CLEANUP_CB *cb; 102 ENGINE_CLEANUP_CB *cb;
104 } ENGINE_CLEANUP_ITEM; 103} ENGINE_CLEANUP_ITEM;
105DECLARE_STACK_OF(ENGINE_CLEANUP_ITEM) 104DECLARE_STACK_OF(ENGINE_CLEANUP_ITEM)
106void engine_cleanup_add_first(ENGINE_CLEANUP_CB *cb); 105void engine_cleanup_add_first(ENGINE_CLEANUP_CB *cb);
107void engine_cleanup_add_last(ENGINE_CLEANUP_CB *cb); 106void engine_cleanup_add_last(ENGINE_CLEANUP_CB *cb);
@@ -118,17 +117,20 @@ DECLARE_STACK_OF(ENGINE)
118 * as a (ENGINE_TABLE *) pointer value set initially to NULL. */ 117 * as a (ENGINE_TABLE *) pointer value set initially to NULL. */
119typedef struct st_engine_table ENGINE_TABLE; 118typedef struct st_engine_table ENGINE_TABLE;
120int engine_table_register(ENGINE_TABLE **table, ENGINE_CLEANUP_CB *cleanup, 119int engine_table_register(ENGINE_TABLE **table, ENGINE_CLEANUP_CB *cleanup,
121 ENGINE *e, const int *nids, int num_nids, int setdefault); 120 ENGINE *e, const int *nids, int num_nids, int setdefault);
122void engine_table_unregister(ENGINE_TABLE **table, ENGINE *e); 121void engine_table_unregister(ENGINE_TABLE **table, ENGINE *e);
123void engine_table_cleanup(ENGINE_TABLE **table); 122void engine_table_cleanup(ENGINE_TABLE **table);
124#ifndef ENGINE_TABLE_DEBUG 123#ifndef ENGINE_TABLE_DEBUG
125ENGINE *engine_table_select(ENGINE_TABLE **table, int nid); 124ENGINE *engine_table_select(ENGINE_TABLE **table, int nid);
126#else 125#else
127ENGINE *engine_table_select_tmp(ENGINE_TABLE **table, int nid, const char *f, int l); 126ENGINE *engine_table_select_tmp(ENGINE_TABLE **table, int nid, const char *f,
127 int l);
128#define engine_table_select(t,n) engine_table_select_tmp(t,n,__FILE__,__LINE__) 128#define engine_table_select(t,n) engine_table_select_tmp(t,n,__FILE__,__LINE__)
129#endif 129#endif
130typedef void (engine_table_doall_cb)(int nid, STACK_OF(ENGINE) *sk, ENGINE *def, void *arg); 130typedef void (engine_table_doall_cb)(int nid, STACK_OF(ENGINE) *sk,
131void engine_table_doall(ENGINE_TABLE *table, engine_table_doall_cb *cb, void *arg); 131 ENGINE *def, void *arg);
132void engine_table_doall(ENGINE_TABLE *table, engine_table_doall_cb *cb,
133 void *arg);
132 134
133/* Internal versions of API functions that have control over locking. These are 135/* Internal versions of API functions that have control over locking. These are
134 * used between C files when functionality needs to be shared but the caller may 136 * used between C files when functionality needs to be shared but the caller may
@@ -152,8 +154,7 @@ void engine_pkey_asn1_meths_free(ENGINE *e);
152 154
153/* This is a structure for storing implementations of various crypto 155/* This is a structure for storing implementations of various crypto
154 * algorithms and functions. */ 156 * algorithms and functions. */
155struct engine_st 157struct engine_st {
156 {
157 const char *id; 158 const char *id;
158 const char *name; 159 const char *name;
159 const RSA_METHOD *rsa_meth; 160 const RSA_METHOD *rsa_meth;
@@ -197,7 +198,7 @@ struct engine_st
197 /* Used to maintain the linked-list of engines. */ 198 /* Used to maintain the linked-list of engines. */
198 struct engine_st *prev; 199 struct engine_st *prev;
199 struct engine_st *next; 200 struct engine_st *next;
200 }; 201};
201 202
202#ifdef __cplusplus 203#ifdef __cplusplus
203} 204}