diff options
author | Matt Caswell <matt@openssl.org> | 2016-10-15 15:23:03 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-11-02 23:32:50 +0000 |
commit | cb6ea61c161e88aa0268c77f308469a67b2ec063 (patch) | |
tree | d7258a4436007e4abaa4374ba2a1a7b0aaf64a0e /include | |
parent | ce95f3b724f71f42dd57af4a0a8e2f571deaf94d (diff) |
Partial revert of 3d8b2ec42 to add back DSO_pathbyaddr
Commit 3d8b2ec42 removed various unused functions. However now we need to
use one of them! This commit resurrects DSO_pathbyaddr(). We're not going to
resurrect the Windows version though because what we need to achieve can be
done a different way on Windows.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/internal/dso.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/internal/dso.h b/include/internal/dso.h index 79d98f4785..6f50f005a9 100644 --- a/include/internal/dso.h +++ b/include/internal/dso.h @@ -131,6 +131,17 @@ DSO_FUNC_TYPE DSO_bind_func(DSO *dso, const char *symname); DSO_METHOD *DSO_METHOD_openssl(void); /* + * This function writes null-terminated pathname of DSO module containing + * 'addr' into 'sz' large caller-provided 'path' and returns the number of + * characters [including trailing zero] written to it. If 'sz' is 0 or + * negative, 'path' is ignored and required amount of charachers [including + * trailing zero] to accommodate pathname is returned. If 'addr' is NULL, then + * pathname of cryptolib itself is returned. Negative or zero return value + * denotes error. + */ +int DSO_pathbyaddr(void *addr, char *path, int sz); + +/* * This function should be used with caution! It looks up symbols in *all* * loaded modules and if module gets unloaded by somebody else attempt to * dereference the pointer is doomed to have fatal consequences. Primary @@ -171,6 +182,7 @@ int ERR_load_DSO_strings(void); # define DSO_F_DSO_LOAD 112 # define DSO_F_DSO_MERGE 132 # define DSO_F_DSO_NEW_METHOD 113 +# define DSO_F_DSO_PATHBYADDR 105 # define DSO_F_DSO_SET_FILENAME 129 # define DSO_F_DSO_UP_REF 114 # define DSO_F_VMS_BIND_SYM 115 @@ -183,6 +195,7 @@ int ERR_load_DSO_strings(void); # define DSO_F_WIN32_LOAD 120 # define DSO_F_WIN32_MERGER 134 # define DSO_F_WIN32_NAME_CONVERTER 125 +# define DSO_F_WIN32_PATHBYADDR 109 # define DSO_F_WIN32_SPLITTER 136 # define DSO_F_WIN32_UNLOAD 121 |