diff options
Diffstat (limited to 'src/lib/libcrypto/dso/dso_lib.c')
-rw-r--r-- | src/lib/libcrypto/dso/dso_lib.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/lib/libcrypto/dso/dso_lib.c b/src/lib/libcrypto/dso/dso_lib.c index 6dc98803ec..ca762f68dc 100644 --- a/src/lib/libcrypto/dso/dso_lib.c +++ b/src/lib/libcrypto/dso/dso_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dso_lib.c,v 1.20 2018/08/24 19:27:01 tb Exp $ */ | 1 | /* $OpenBSD: dso_lib.c,v 1.21 2023/07/08 07:22:58 beck 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 | */ |
@@ -70,24 +70,28 @@ DSO_new(void) | |||
70 | { | 70 | { |
71 | return (DSO_new_method(NULL)); | 71 | return (DSO_new_method(NULL)); |
72 | } | 72 | } |
73 | LCRYPTO_ALIAS(DSO_new); | ||
73 | 74 | ||
74 | void | 75 | void |
75 | DSO_set_default_method(DSO_METHOD *meth) | 76 | DSO_set_default_method(DSO_METHOD *meth) |
76 | { | 77 | { |
77 | default_DSO_meth = meth; | 78 | default_DSO_meth = meth; |
78 | } | 79 | } |
80 | LCRYPTO_ALIAS(DSO_set_default_method); | ||
79 | 81 | ||
80 | DSO_METHOD * | 82 | DSO_METHOD * |
81 | DSO_get_default_method(void) | 83 | DSO_get_default_method(void) |
82 | { | 84 | { |
83 | return (default_DSO_meth); | 85 | return (default_DSO_meth); |
84 | } | 86 | } |
87 | LCRYPTO_ALIAS(DSO_get_default_method); | ||
85 | 88 | ||
86 | DSO_METHOD * | 89 | DSO_METHOD * |
87 | DSO_get_method(DSO *dso) | 90 | DSO_get_method(DSO *dso) |
88 | { | 91 | { |
89 | return (dso->meth); | 92 | return (dso->meth); |
90 | } | 93 | } |
94 | LCRYPTO_ALIAS(DSO_get_method); | ||
91 | 95 | ||
92 | DSO_METHOD * | 96 | DSO_METHOD * |
93 | DSO_set_method(DSO *dso, DSO_METHOD *meth) | 97 | DSO_set_method(DSO *dso, DSO_METHOD *meth) |
@@ -98,6 +102,7 @@ DSO_set_method(DSO *dso, DSO_METHOD *meth) | |||
98 | dso->meth = meth; | 102 | dso->meth = meth; |
99 | return (mtmp); | 103 | return (mtmp); |
100 | } | 104 | } |
105 | LCRYPTO_ALIAS(DSO_set_method); | ||
101 | 106 | ||
102 | DSO * | 107 | DSO * |
103 | DSO_new_method(DSO_METHOD *meth) | 108 | DSO_new_method(DSO_METHOD *meth) |
@@ -132,6 +137,7 @@ DSO_new_method(DSO_METHOD *meth) | |||
132 | } | 137 | } |
133 | return (ret); | 138 | return (ret); |
134 | } | 139 | } |
140 | LCRYPTO_ALIAS(DSO_new_method); | ||
135 | 141 | ||
136 | int | 142 | int |
137 | DSO_free(DSO *dso) | 143 | DSO_free(DSO *dso) |
@@ -163,12 +169,14 @@ DSO_free(DSO *dso) | |||
163 | free(dso); | 169 | free(dso); |
164 | return (1); | 170 | return (1); |
165 | } | 171 | } |
172 | LCRYPTO_ALIAS(DSO_free); | ||
166 | 173 | ||
167 | int | 174 | int |
168 | DSO_flags(DSO *dso) | 175 | DSO_flags(DSO *dso) |
169 | { | 176 | { |
170 | return ((dso == NULL) ? 0 : dso->flags); | 177 | return ((dso == NULL) ? 0 : dso->flags); |
171 | } | 178 | } |
179 | LCRYPTO_ALIAS(DSO_flags); | ||
172 | 180 | ||
173 | 181 | ||
174 | int | 182 | int |
@@ -184,6 +192,7 @@ DSO_up_ref(DSO *dso) | |||
184 | refs = CRYPTO_add(&dso->references, 1, CRYPTO_LOCK_DSO); | 192 | refs = CRYPTO_add(&dso->references, 1, CRYPTO_LOCK_DSO); |
185 | return ((refs > 1) ? 1 : 0); | 193 | return ((refs > 1) ? 1 : 0); |
186 | } | 194 | } |
195 | LCRYPTO_ALIAS(DSO_up_ref); | ||
187 | 196 | ||
188 | DSO * | 197 | DSO * |
189 | DSO_load(DSO *dso, const char *filename, DSO_METHOD *meth, int flags) | 198 | DSO_load(DSO *dso, const char *filename, DSO_METHOD *meth, int flags) |
@@ -238,6 +247,7 @@ err: | |||
238 | DSO_free(ret); | 247 | DSO_free(ret); |
239 | return (NULL); | 248 | return (NULL); |
240 | } | 249 | } |
250 | LCRYPTO_ALIAS(DSO_load); | ||
241 | 251 | ||
242 | void * | 252 | void * |
243 | DSO_bind_var(DSO *dso, const char *symname) | 253 | DSO_bind_var(DSO *dso, const char *symname) |
@@ -259,6 +269,7 @@ DSO_bind_var(DSO *dso, const char *symname) | |||
259 | /* Success */ | 269 | /* Success */ |
260 | return (ret); | 270 | return (ret); |
261 | } | 271 | } |
272 | LCRYPTO_ALIAS(DSO_bind_var); | ||
262 | 273 | ||
263 | DSO_FUNC_TYPE | 274 | DSO_FUNC_TYPE |
264 | DSO_bind_func(DSO *dso, const char *symname) | 275 | DSO_bind_func(DSO *dso, const char *symname) |
@@ -280,6 +291,7 @@ DSO_bind_func(DSO *dso, const char *symname) | |||
280 | /* Success */ | 291 | /* Success */ |
281 | return (ret); | 292 | return (ret); |
282 | } | 293 | } |
294 | LCRYPTO_ALIAS(DSO_bind_func); | ||
283 | 295 | ||
284 | /* I don't really like these *_ctrl functions very much to be perfectly | 296 | /* I don't really like these *_ctrl functions very much to be perfectly |
285 | * honest. For one thing, I think I have to return a negative value for | 297 | * honest. For one thing, I think I have to return a negative value for |
@@ -317,6 +329,7 @@ DSO_ctrl(DSO *dso, int cmd, long larg, void *parg) | |||
317 | } | 329 | } |
318 | return (dso->meth->dso_ctrl(dso, cmd, larg, parg)); | 330 | return (dso->meth->dso_ctrl(dso, cmd, larg, parg)); |
319 | } | 331 | } |
332 | LCRYPTO_ALIAS(DSO_ctrl); | ||
320 | 333 | ||
321 | int | 334 | int |
322 | DSO_set_name_converter(DSO *dso, DSO_NAME_CONVERTER_FUNC cb, | 335 | DSO_set_name_converter(DSO *dso, DSO_NAME_CONVERTER_FUNC cb, |
@@ -331,6 +344,7 @@ DSO_set_name_converter(DSO *dso, DSO_NAME_CONVERTER_FUNC cb, | |||
331 | dso->name_converter = cb; | 344 | dso->name_converter = cb; |
332 | return (1); | 345 | return (1); |
333 | } | 346 | } |
347 | LCRYPTO_ALIAS(DSO_set_name_converter); | ||
334 | 348 | ||
335 | const char * | 349 | const char * |
336 | DSO_get_filename(DSO *dso) | 350 | DSO_get_filename(DSO *dso) |
@@ -341,6 +355,7 @@ DSO_get_filename(DSO *dso) | |||
341 | } | 355 | } |
342 | return (dso->filename); | 356 | return (dso->filename); |
343 | } | 357 | } |
358 | LCRYPTO_ALIAS(DSO_get_filename); | ||
344 | 359 | ||
345 | int | 360 | int |
346 | DSO_set_filename(DSO *dso, const char *filename) | 361 | DSO_set_filename(DSO *dso, const char *filename) |
@@ -365,6 +380,7 @@ DSO_set_filename(DSO *dso, const char *filename) | |||
365 | dso->filename = copied; | 380 | dso->filename = copied; |
366 | return (1); | 381 | return (1); |
367 | } | 382 | } |
383 | LCRYPTO_ALIAS(DSO_set_filename); | ||
368 | 384 | ||
369 | char * | 385 | char * |
370 | DSO_merge(DSO *dso, const char *filespec1, const char *filespec2) | 386 | DSO_merge(DSO *dso, const char *filespec1, const char *filespec2) |
@@ -384,6 +400,7 @@ DSO_merge(DSO *dso, const char *filespec1, const char *filespec2) | |||
384 | } | 400 | } |
385 | return (result); | 401 | return (result); |
386 | } | 402 | } |
403 | LCRYPTO_ALIAS(DSO_merge); | ||
387 | 404 | ||
388 | char * | 405 | char * |
389 | DSO_convert_filename(DSO *dso, const char *filename) | 406 | DSO_convert_filename(DSO *dso, const char *filename) |
@@ -415,6 +432,7 @@ DSO_convert_filename(DSO *dso, const char *filename) | |||
415 | } | 432 | } |
416 | return (result); | 433 | return (result); |
417 | } | 434 | } |
435 | LCRYPTO_ALIAS(DSO_convert_filename); | ||
418 | 436 | ||
419 | const char * | 437 | const char * |
420 | DSO_get_loaded_filename(DSO *dso) | 438 | DSO_get_loaded_filename(DSO *dso) |
@@ -425,6 +443,7 @@ DSO_get_loaded_filename(DSO *dso) | |||
425 | } | 443 | } |
426 | return (dso->loaded_filename); | 444 | return (dso->loaded_filename); |
427 | } | 445 | } |
446 | LCRYPTO_ALIAS(DSO_get_loaded_filename); | ||
428 | 447 | ||
429 | int | 448 | int |
430 | DSO_pathbyaddr(void *addr, char *path, int sz) | 449 | DSO_pathbyaddr(void *addr, char *path, int sz) |
@@ -438,6 +457,7 @@ DSO_pathbyaddr(void *addr, char *path, int sz) | |||
438 | } | 457 | } |
439 | return (*meth->pathbyaddr)(addr, path, sz); | 458 | return (*meth->pathbyaddr)(addr, path, sz); |
440 | } | 459 | } |
460 | LCRYPTO_ALIAS(DSO_pathbyaddr); | ||
441 | 461 | ||
442 | void * | 462 | void * |
443 | DSO_global_lookup(const char *name) | 463 | DSO_global_lookup(const char *name) |
@@ -451,3 +471,4 @@ DSO_global_lookup(const char *name) | |||
451 | } | 471 | } |
452 | return (*meth->globallookup)(name); | 472 | return (*meth->globallookup)(name); |
453 | } | 473 | } |
474 | LCRYPTO_ALIAS(DSO_global_lookup); | ||