diff options
author | djm <> | 2010-10-01 22:59:01 +0000 |
---|---|---|
committer | djm <> | 2010-10-01 22:59:01 +0000 |
commit | fe047d8b632246cb2db3234a0a4f32e5c318857b (patch) | |
tree | 939b752540947d33507b3acc48d76a8bfb7c3dc3 /src/lib/libcrypto/dso/dso_lib.c | |
parent | 2ea67f4aa254b09ded62e6e14fc893bbe6381579 (diff) | |
download | openbsd-fe047d8b632246cb2db3234a0a4f32e5c318857b.tar.gz openbsd-fe047d8b632246cb2db3234a0a4f32e5c318857b.tar.bz2 openbsd-fe047d8b632246cb2db3234a0a4f32e5c318857b.zip |
resolve conflicts, fix local changes
Diffstat (limited to 'src/lib/libcrypto/dso/dso_lib.c')
-rw-r--r-- | src/lib/libcrypto/dso/dso_lib.c | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/src/lib/libcrypto/dso/dso_lib.c b/src/lib/libcrypto/dso/dso_lib.c index 49bdd71309..8a15b794ab 100644 --- a/src/lib/libcrypto/dso/dso_lib.c +++ b/src/lib/libcrypto/dso/dso_lib.c | |||
@@ -107,7 +107,7 @@ DSO *DSO_new_method(DSO_METHOD *meth) | |||
107 | return(NULL); | 107 | return(NULL); |
108 | } | 108 | } |
109 | memset(ret, 0, sizeof(DSO)); | 109 | memset(ret, 0, sizeof(DSO)); |
110 | ret->meth_data = sk_new_null(); | 110 | ret->meth_data = sk_void_new_null(); |
111 | if(ret->meth_data == NULL) | 111 | if(ret->meth_data == NULL) |
112 | { | 112 | { |
113 | /* sk_new doesn't generate any errors so we do */ | 113 | /* sk_new doesn't generate any errors so we do */ |
@@ -163,7 +163,7 @@ int DSO_free(DSO *dso) | |||
163 | return(0); | 163 | return(0); |
164 | } | 164 | } |
165 | 165 | ||
166 | sk_free(dso->meth_data); | 166 | sk_void_free(dso->meth_data); |
167 | if(dso->filename != NULL) | 167 | if(dso->filename != NULL) |
168 | OPENSSL_free(dso->filename); | 168 | OPENSSL_free(dso->filename); |
169 | if(dso->loaded_filename != NULL) | 169 | if(dso->loaded_filename != NULL) |
@@ -399,13 +399,6 @@ char *DSO_merge(DSO *dso, const char *filespec1, const char *filespec2) | |||
399 | DSOerr(DSO_F_DSO_MERGE,ERR_R_PASSED_NULL_PARAMETER); | 399 | DSOerr(DSO_F_DSO_MERGE,ERR_R_PASSED_NULL_PARAMETER); |
400 | return(NULL); | 400 | return(NULL); |
401 | } | 401 | } |
402 | if(filespec1 == NULL) | ||
403 | filespec1 = dso->filename; | ||
404 | if(filespec1 == NULL) | ||
405 | { | ||
406 | DSOerr(DSO_F_DSO_MERGE,DSO_R_NO_FILE_SPECIFICATION); | ||
407 | return(NULL); | ||
408 | } | ||
409 | if((dso->flags & DSO_FLAG_NO_NAME_TRANSLATION) == 0) | 402 | if((dso->flags & DSO_FLAG_NO_NAME_TRANSLATION) == 0) |
410 | { | 403 | { |
411 | if(dso->merger != NULL) | 404 | if(dso->merger != NULL) |
@@ -464,3 +457,27 @@ const char *DSO_get_loaded_filename(DSO *dso) | |||
464 | } | 457 | } |
465 | return(dso->loaded_filename); | 458 | return(dso->loaded_filename); |
466 | } | 459 | } |
460 | |||
461 | int DSO_pathbyaddr(void *addr,char *path,int sz) | ||
462 | { | ||
463 | DSO_METHOD *meth = default_DSO_meth; | ||
464 | if (meth == NULL) meth = DSO_METHOD_openssl(); | ||
465 | if (meth->pathbyaddr == NULL) | ||
466 | { | ||
467 | DSOerr(DSO_F_DSO_PATHBYADDR,DSO_R_UNSUPPORTED); | ||
468 | return -1; | ||
469 | } | ||
470 | return (*meth->pathbyaddr)(addr,path,sz); | ||
471 | } | ||
472 | |||
473 | void *DSO_global_lookup(const char *name) | ||
474 | { | ||
475 | DSO_METHOD *meth = default_DSO_meth; | ||
476 | if (meth == NULL) meth = DSO_METHOD_openssl(); | ||
477 | if (meth->globallookup == NULL) | ||
478 | { | ||
479 | DSOerr(DSO_F_DSO_GLOBAL_LOOKUP,DSO_R_UNSUPPORTED); | ||
480 | return NULL; | ||
481 | } | ||
482 | return (*meth->globallookup)(name); | ||
483 | } | ||