OLD | NEW |
1 /* crypto/engine/eng_int.h */ | 1 /* crypto/engine/eng_int.h */ |
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 */ |
5 /* ==================================================================== | 5 /* ==================================================================== |
6 * Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved. | 6 * Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved. |
7 * | 7 * |
8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
10 * are met: | 10 * are met: |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 int engine_table_register(ENGINE_TABLE **table, ENGINE_CLEANUP_CB *cleanup, | 120 int engine_table_register(ENGINE_TABLE **table, ENGINE_CLEANUP_CB *cleanup, |
121 ENGINE *e, const int *nids, int num_nids, int setdefault); | 121 ENGINE *e, const int *nids, int num_nids, int setdefault); |
122 void engine_table_unregister(ENGINE_TABLE **table, ENGINE *e); | 122 void engine_table_unregister(ENGINE_TABLE **table, ENGINE *e); |
123 void engine_table_cleanup(ENGINE_TABLE **table); | 123 void engine_table_cleanup(ENGINE_TABLE **table); |
124 #ifndef ENGINE_TABLE_DEBUG | 124 #ifndef ENGINE_TABLE_DEBUG |
125 ENGINE *engine_table_select(ENGINE_TABLE **table, int nid); | 125 ENGINE *engine_table_select(ENGINE_TABLE **table, int nid); |
126 #else | 126 #else |
127 ENGINE *engine_table_select_tmp(ENGINE_TABLE **table, int nid, const char *f, in
t l); | 127 ENGINE *engine_table_select_tmp(ENGINE_TABLE **table, int nid, const char *f, in
t 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 |
| 130 typedef void (engine_table_doall_cb)(int nid, STACK_OF(ENGINE) *sk, ENGINE *def,
void *arg); |
| 131 void engine_table_doall(ENGINE_TABLE *table, engine_table_doall_cb *cb, void *ar
g); |
130 | 132 |
131 /* Internal versions of API functions that have control over locking. These are | 133 /* Internal versions of API functions that have control over locking. These are |
132 * used between C files when functionality needs to be shared but the caller may | 134 * used between C files when functionality needs to be shared but the caller may |
133 * already be controlling of the CRYPTO_LOCK_ENGINE lock. */ | 135 * already be controlling of the CRYPTO_LOCK_ENGINE lock. */ |
134 int engine_unlocked_init(ENGINE *e); | 136 int engine_unlocked_init(ENGINE *e); |
135 int engine_unlocked_finish(ENGINE *e, int unlock_for_handlers); | 137 int engine_unlocked_finish(ENGINE *e, int unlock_for_handlers); |
136 int engine_free_util(ENGINE *e, int locked); | 138 int engine_free_util(ENGINE *e, int locked); |
137 | 139 |
138 /* This function will reset all "set"able values in an ENGINE to NULL. This | 140 /* This function will reset all "set"able values in an ENGINE to NULL. This |
139 * won't touch reference counts or ex_data, but is equivalent to calling all the | 141 * won't touch reference counts or ex_data, but is equivalent to calling all the |
140 * ENGINE_set_***() functions with a NULL value. */ | 142 * ENGINE_set_***() functions with a NULL value. */ |
141 void engine_set_all_null(ENGINE *e); | 143 void engine_set_all_null(ENGINE *e); |
142 | 144 |
143 /* NB: Bitwise OR-able values for the "flags" variable in ENGINE are now exposed | 145 /* NB: Bitwise OR-able values for the "flags" variable in ENGINE are now exposed |
144 * in engine.h. */ | 146 * in engine.h. */ |
145 | 147 |
| 148 /* Free up dynamically allocated public key methods associated with ENGINE */ |
| 149 |
| 150 void engine_pkey_meths_free(ENGINE *e); |
| 151 void engine_pkey_asn1_meths_free(ENGINE *e); |
| 152 |
146 /* This is a structure for storing implementations of various crypto | 153 /* This is a structure for storing implementations of various crypto |
147 * algorithms and functions. */ | 154 * algorithms and functions. */ |
148 struct engine_st | 155 struct engine_st |
149 { | 156 { |
150 const char *id; | 157 const char *id; |
151 const char *name; | 158 const char *name; |
152 const RSA_METHOD *rsa_meth; | 159 const RSA_METHOD *rsa_meth; |
153 const DSA_METHOD *dsa_meth; | 160 const DSA_METHOD *dsa_meth; |
154 const DH_METHOD *dh_meth; | 161 const DH_METHOD *dh_meth; |
155 const ECDH_METHOD *ecdh_meth; | 162 const ECDH_METHOD *ecdh_meth; |
156 const ECDSA_METHOD *ecdsa_meth; | 163 const ECDSA_METHOD *ecdsa_meth; |
157 const RAND_METHOD *rand_meth; | 164 const RAND_METHOD *rand_meth; |
158 const STORE_METHOD *store_meth; | 165 const STORE_METHOD *store_meth; |
159 /* Cipher handling is via this callback */ | 166 /* Cipher handling is via this callback */ |
160 ENGINE_CIPHERS_PTR ciphers; | 167 ENGINE_CIPHERS_PTR ciphers; |
161 /* Digest handling is via this callback */ | 168 /* Digest handling is via this callback */ |
162 ENGINE_DIGESTS_PTR digests; | 169 ENGINE_DIGESTS_PTR digests; |
163 | 170 » /* Public key handling via this callback */ |
| 171 » ENGINE_PKEY_METHS_PTR pkey_meths; |
| 172 » /* ASN1 public key handling via this callback */ |
| 173 » ENGINE_PKEY_ASN1_METHS_PTR pkey_asn1_meths; |
164 | 174 |
165 ENGINE_GEN_INT_FUNC_PTR destroy; | 175 ENGINE_GEN_INT_FUNC_PTR destroy; |
166 | 176 |
167 ENGINE_GEN_INT_FUNC_PTR init; | 177 ENGINE_GEN_INT_FUNC_PTR init; |
168 ENGINE_GEN_INT_FUNC_PTR finish; | 178 ENGINE_GEN_INT_FUNC_PTR finish; |
169 ENGINE_CTRL_FUNC_PTR ctrl; | 179 ENGINE_CTRL_FUNC_PTR ctrl; |
170 ENGINE_LOAD_KEY_PTR load_privkey; | 180 ENGINE_LOAD_KEY_PTR load_privkey; |
171 ENGINE_LOAD_KEY_PTR load_pubkey; | 181 ENGINE_LOAD_KEY_PTR load_pubkey; |
172 | 182 |
173 ENGINE_SSL_CLIENT_CERT_PTR load_ssl_client_cert; | 183 ENGINE_SSL_CLIENT_CERT_PTR load_ssl_client_cert; |
(...skipping 13 matching lines...) Expand all Loading... |
187 /* Used to maintain the linked-list of engines. */ | 197 /* Used to maintain the linked-list of engines. */ |
188 struct engine_st *prev; | 198 struct engine_st *prev; |
189 struct engine_st *next; | 199 struct engine_st *next; |
190 }; | 200 }; |
191 | 201 |
192 #ifdef __cplusplus | 202 #ifdef __cplusplus |
193 } | 203 } |
194 #endif | 204 #endif |
195 | 205 |
196 #endif /* HEADER_ENGINE_INT_H */ | 206 #endif /* HEADER_ENGINE_INT_H */ |
OLD | NEW |