summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dso/dso.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/dso/dso.h')
-rw-r--r--src/lib/libcrypto/dso/dso.h52
1 files changed, 3 insertions, 49 deletions
diff --git a/src/lib/libcrypto/dso/dso.h b/src/lib/libcrypto/dso/dso.h
index 3e51913a72..aa721f7feb 100644
--- a/src/lib/libcrypto/dso/dso.h
+++ b/src/lib/libcrypto/dso/dso.h
@@ -1,4 +1,4 @@
1/* dso.h -*- mode:C; c-file-style: "eay" -*- */ 1/* dso.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 */
@@ -95,13 +95,6 @@ extern "C" {
95 */ 95 */
96#define DSO_FLAG_UPCASE_SYMBOL 0x10 96#define DSO_FLAG_UPCASE_SYMBOL 0x10
97 97
98/* This flag loads the library with public symbols.
99 * Meaning: The exported symbols of this library are public
100 * to all libraries loaded after this library.
101 * At the moment only implemented in unix.
102 */
103#define DSO_FLAG_GLOBAL_SYMBOLS 0x20
104
105 98
106typedef void (*DSO_FUNC_TYPE)(void); 99typedef void (*DSO_FUNC_TYPE)(void);
107 100
@@ -114,22 +107,6 @@ typedef struct dso_st DSO;
114 * condition) or a newly allocated string containing the transformed form that 107 * condition) or a newly allocated string containing the transformed form that
115 * the caller will need to free with OPENSSL_free() when done. */ 108 * the caller will need to free with OPENSSL_free() when done. */
116typedef char* (*DSO_NAME_CONVERTER_FUNC)(DSO *, const char *); 109typedef char* (*DSO_NAME_CONVERTER_FUNC)(DSO *, const char *);
117/* The function prototype used for method functions (or caller-provided
118 * callbacks) that merge two file specifications. They are passed a
119 * DSO structure pointer (or NULL if they are to be used independantly of
120 * a DSO object) and two file specifications to merge. They should
121 * either return NULL (if there is an error condition) or a newly allocated
122 * string containing the result of merging that the caller will need
123 * to free with OPENSSL_free() when done.
124 * Here, merging means that bits and pieces are taken from each of the
125 * file specifications and added together in whatever fashion that is
126 * sensible for the DSO method in question. The only rule that really
127 * applies is that if the two specification contain pieces of the same
128 * type, the copy from the first string takes priority. One could see
129 * it as the first specification is the one given by the user and the
130 * second being a bunch of defaults to add on if they're missing in the
131 * first. */
132typedef char* (*DSO_MERGER_FUNC)(DSO *, const char *, const char *);
133 110
134typedef struct dso_meth_st 111typedef struct dso_meth_st
135 { 112 {
@@ -163,9 +140,6 @@ typedef struct dso_meth_st
163 /* The default DSO_METHOD-specific function for converting filenames to 140 /* The default DSO_METHOD-specific function for converting filenames to
164 * a canonical native form. */ 141 * a canonical native form. */
165 DSO_NAME_CONVERTER_FUNC dso_name_converter; 142 DSO_NAME_CONVERTER_FUNC dso_name_converter;
166 /* The default DSO_METHOD-specific function for converting filenames to
167 * a canonical native form. */
168 DSO_MERGER_FUNC dso_merger;
169 143
170 /* [De]Initialisation handlers. */ 144 /* [De]Initialisation handlers. */
171 int (*init)(DSO *dso); 145 int (*init)(DSO *dso);
@@ -190,13 +164,9 @@ struct dso_st
190 * don't touch meth_data! */ 164 * don't touch meth_data! */
191 CRYPTO_EX_DATA ex_data; 165 CRYPTO_EX_DATA ex_data;
192 /* If this callback function pointer is set to non-NULL, then it will 166 /* If this callback function pointer is set to non-NULL, then it will
193 * be used in DSO_load() in place of meth->dso_name_converter. NB: This 167 * be used on DSO_load() in place of meth->dso_name_converter. NB: This
194 * should normally set using DSO_set_name_converter(). */ 168 * should normally set using DSO_set_name_converter(). */
195 DSO_NAME_CONVERTER_FUNC name_converter; 169 DSO_NAME_CONVERTER_FUNC name_converter;
196 /* If this callback function pointer is set to non-NULL, then it will
197 * be used in DSO_load() in place of meth->dso_merger. NB: This
198 * should normally set using DSO_set_merger(). */
199 DSO_MERGER_FUNC merger;
200 /* This is populated with (a copy of) the platform-independant 170 /* This is populated with (a copy of) the platform-independant
201 * filename used for this DSO. */ 171 * filename used for this DSO. */
202 char *filename; 172 char *filename;
@@ -239,11 +209,6 @@ int DSO_set_filename(DSO *dso, const char *filename);
239 * caller-created DSO_METHODs can do the same thing. A non-NULL return value 209 * caller-created DSO_METHODs can do the same thing. A non-NULL return value
240 * will need to be OPENSSL_free()'d. */ 210 * will need to be OPENSSL_free()'d. */
241char *DSO_convert_filename(DSO *dso, const char *filename); 211char *DSO_convert_filename(DSO *dso, const char *filename);
242/* This function will invoke the DSO's merger callback to merge two file
243 * specifications, or if the callback isn't set it will instead use the
244 * DSO_METHOD's merger. A non-NULL return value will need to be
245 * OPENSSL_free()'d. */
246char *DSO_merge(DSO *dso, const char *filespec1, const char *filespec2);
247/* If the DSO is currently loaded, this returns the filename that it was loaded 212/* If the DSO is currently loaded, this returns the filename that it was loaded
248 * under, otherwise it returns NULL. So it is also useful as a test as to 213 * under, otherwise it returns NULL. So it is also useful as a test as to
249 * whether the DSO is currently loaded. NB: This will not necessarily return 214 * whether the DSO is currently loaded. NB: This will not necessarily return
@@ -308,13 +273,11 @@ void ERR_load_DSO_strings(void);
308#define DSO_F_DLFCN_BIND_FUNC 100 273#define DSO_F_DLFCN_BIND_FUNC 100
309#define DSO_F_DLFCN_BIND_VAR 101 274#define DSO_F_DLFCN_BIND_VAR 101
310#define DSO_F_DLFCN_LOAD 102 275#define DSO_F_DLFCN_LOAD 102
311#define DSO_F_DLFCN_MERGER 130
312#define DSO_F_DLFCN_NAME_CONVERTER 123 276#define DSO_F_DLFCN_NAME_CONVERTER 123
313#define DSO_F_DLFCN_UNLOAD 103 277#define DSO_F_DLFCN_UNLOAD 103
314#define DSO_F_DL_BIND_FUNC 104 278#define DSO_F_DL_BIND_FUNC 104
315#define DSO_F_DL_BIND_VAR 105 279#define DSO_F_DL_BIND_VAR 105
316#define DSO_F_DL_LOAD 106 280#define DSO_F_DL_LOAD 106
317#define DSO_F_DL_MERGER 131
318#define DSO_F_DL_NAME_CONVERTER 124 281#define DSO_F_DL_NAME_CONVERTER 124
319#define DSO_F_DL_UNLOAD 107 282#define DSO_F_DL_UNLOAD 107
320#define DSO_F_DSO_BIND_FUNC 108 283#define DSO_F_DSO_BIND_FUNC 108
@@ -325,36 +288,27 @@ void ERR_load_DSO_strings(void);
325#define DSO_F_DSO_GET_FILENAME 127 288#define DSO_F_DSO_GET_FILENAME 127
326#define DSO_F_DSO_GET_LOADED_FILENAME 128 289#define DSO_F_DSO_GET_LOADED_FILENAME 128
327#define DSO_F_DSO_LOAD 112 290#define DSO_F_DSO_LOAD 112
328#define DSO_F_DSO_MERGE 132
329#define DSO_F_DSO_NEW_METHOD 113 291#define DSO_F_DSO_NEW_METHOD 113
330#define DSO_F_DSO_SET_FILENAME 129 292#define DSO_F_DSO_SET_FILENAME 129
331#define DSO_F_DSO_SET_NAME_CONVERTER 122 293#define DSO_F_DSO_SET_NAME_CONVERTER 122
332#define DSO_F_DSO_UP_REF 114 294#define DSO_F_DSO_UP_REF 114
333#define DSO_F_VMS_BIND_SYM 115 295#define DSO_F_VMS_BIND_VAR 115
334#define DSO_F_VMS_LOAD 116 296#define DSO_F_VMS_LOAD 116
335#define DSO_F_VMS_MERGER 133
336#define DSO_F_VMS_UNLOAD 117 297#define DSO_F_VMS_UNLOAD 117
337#define DSO_F_WIN32_BIND_FUNC 118 298#define DSO_F_WIN32_BIND_FUNC 118
338#define DSO_F_WIN32_BIND_VAR 119 299#define DSO_F_WIN32_BIND_VAR 119
339#define DSO_F_WIN32_JOINER 135
340#define DSO_F_WIN32_LOAD 120 300#define DSO_F_WIN32_LOAD 120
341#define DSO_F_WIN32_MERGER 134
342#define DSO_F_WIN32_NAME_CONVERTER 125 301#define DSO_F_WIN32_NAME_CONVERTER 125
343#define DSO_F_WIN32_SPLITTER 136
344#define DSO_F_WIN32_UNLOAD 121 302#define DSO_F_WIN32_UNLOAD 121
345 303
346/* Reason codes. */ 304/* Reason codes. */
347#define DSO_R_CTRL_FAILED 100 305#define DSO_R_CTRL_FAILED 100
348#define DSO_R_DSO_ALREADY_LOADED 110 306#define DSO_R_DSO_ALREADY_LOADED 110
349#define DSO_R_EMPTY_FILE_STRUCTURE 113
350#define DSO_R_FAILURE 114
351#define DSO_R_FILENAME_TOO_BIG 101 307#define DSO_R_FILENAME_TOO_BIG 101
352#define DSO_R_FINISH_FAILED 102 308#define DSO_R_FINISH_FAILED 102
353#define DSO_R_INCORRECT_FILE_SYNTAX 115
354#define DSO_R_LOAD_FAILED 103 309#define DSO_R_LOAD_FAILED 103
355#define DSO_R_NAME_TRANSLATION_FAILED 109 310#define DSO_R_NAME_TRANSLATION_FAILED 109
356#define DSO_R_NO_FILENAME 111 311#define DSO_R_NO_FILENAME 111
357#define DSO_R_NO_FILE_SPECIFICATION 116
358#define DSO_R_NULL_HANDLE 104 312#define DSO_R_NULL_HANDLE 104
359#define DSO_R_SET_FILENAME_FAILED 112 313#define DSO_R_SET_FILENAME_FAILED 112
360#define DSO_R_STACK_ERROR 105 314#define DSO_R_STACK_ERROR 105