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:35:50 +0000 |
commit | 93558bf5190226494d3b549397fbf94214846d0d (patch) | |
tree | f11b07329329828dd8c4e600dce29f27b4171555 /include | |
parent | 717f4026d593119cf493b3c1e045462c540f4cb3 (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>
(cherry picked from commit cb6ea61c161e88aa0268c77f308469a67b2ec063)
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 970beeb195..f513cad3b7 100644 --- a/include/internal/dso.h +++ b/include/internal/dso.h @@ -137,6 +137,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 @@ -177,6 +188,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 @@ -189,6 +201,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 |