summaryrefslogtreecommitdiffstats
path: root/crypto/dso/dso_dlfcn.c
AgeCommit message (Collapse)Author
2016-11-02Partial revert of 3d8b2ec42 to add back DSO_pathbyaddrMatt Caswell
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)
2016-05-17Copyright consolidation 07/10Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-23Remove several unused undocumented functions.Rich Salz
Removed the following: DSO_bind_var, DSO_bind_var, DSO_get_default_method, DSO_get_loaded_filename, DSO_get_loaded_filename, DSO_get_method, DSO_new_method, DSO_pathbyaddr, DSO_set_default_method, DSO_set_method, DSO_set_name_converter, DSO_set_name_converter Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-22Have only one DSO_METHOD_opensslRich Salz
Instead of have every DSO_METHOD_xxx in all platforms, ensure that only one DSO_METHOD_openssl is available on all platforms. Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-03-22Make DSO opaque.Rich Salz
This was really easy. Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-02-19Let Configure figure out the diverse shared library and DSO extensionsRichard Levitte
Then it can pass around the information where it belongs. The Makefile templates pick it up along with other target data, the DSO module gets to pick up the information through crypto/include/internal/dso_conf.h Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-03GH614: Use memcpy()/strdup() when possibleDmitry-Me
Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2016-01-26Remove /* foo.c */ commentsRich Salz
This was done by the following find . -name '*.[ch]' | /tmp/pl where /tmp/pl is the following three-line script: print unless $. == 1 && m@/\* .*\.[ch] \*/@; close ARGV if eof; # Close file to reset $. And then some hand-editing of other files. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2015-12-18Remove the "eay" c-file-style indicatorsRichard Levitte
Since we don't use the eay style any more, there's no point tryint to tell emacs to use it. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-11-09Continue standardising malloc style for libcryptoMatt Caswell
Continuing from previous commit ensure our style is consistent for malloc return checks. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-05-14Identify and move common internal libcrypto header filesRichard Levitte
There are header files in crypto/ that are used by a number of crypto/ submodules. Move those to crypto/include/internal and adapt the affected source code and Makefiles. The header files that got moved are: crypto/cryptolib.h crypto/md32_common.h Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-01free null cleanup finaleRich Salz
Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-03-17Remove dead code from cryptoMatt Caswell
Some miscellaneous removal of dead code from lib crypto. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-01-30Dead code removal: #if 0 conf, dso, pqueue, threadsRich Salz
Mostly, but not completely, debugging print statements. Some old logic kept for internal documentation reasons, perhaps. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22More commentsMatt Caswell
Conflicts: crypto/dsa/dsa_vrf.c crypto/ec/ec2_smpl.c crypto/ec/ecp_smpl.c Conflicts: demos/bio/saccept.c ssl/d1_clnt.c Conflicts: bugs/dggccbug.c demos/tunala/cb.c Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-30dlfcn: always define _GNU_SOURCEKurt Roeckx
We need this for the freebsd kernel with glibc as used in the Debian kfreebsd ports. There shouldn't be a problem defining this on systems not using glibc. Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-12-21RT3548: Remvoe unsupported platformsRich Salz
This commit removes SunOS (a sentimental favorite of mine). Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-05-19Fix a wrong parameter count ERR_add_error_dataJanpopan
2011-02-12dso_dlfcn.c: make it work on Tru64 4.0.Andy Polyakov
PR: 2316
2011-02-02Make no-asm work in fips mode. Add android platform.Dr. Stephen Henson
2010-03-29dso_dlfcn.c: fix compile failure on Tru64.Andy Polyakov
2009-10-04Prevent aliasing warningDr. Stephen Henson
2009-07-16Use correct extension and OSX detection.Dr. Stephen Henson
2009-07-15Updates from 1.0.0-stableDr. Stephen Henson
2008-06-04More type-checking.Ben Laurie
2008-01-04Last dso_dlfcn.c check-in said "Use Dl_info only on systems where it isAndy Polyakov
known to exist. It does not exist on AIX 4.3.3, AIX 5.1, SCO 5, or Cygwin" and disabled it on banch of systems it's known to exists, such as FreeBSD, Solaris, 64-bit HP-UX, MacOS X. Get it straight.
2007-04-02check if pointer is != NULL before dereferencing it (Coverity CID 40)Nils Larsch
2006-04-11Use Dl_info only on systems where it is known to exist. It does notUlf Möller
exist on AIX 4.3.3, AIX 5.1, SCO 5, or Cygwin.
2006-04-11uncomment; that one slipped throughUlf Möller
2006-04-11improve make dclean to remove files generated during buildUlf Möller
PR: 1308 Submitted by: Oliver Tappe <zooey@hirschkaefer.de> Reviewed by: Ulf Moeller
2006-03-15fix problems found by coverity: remove useless codeNils Larsch
2006-01-02"Relax" prototype and rename DSO_global_lookup_func to DSO_global_lookup.Andy Polyakov
2005-12-30Add DSO_global_lookup_func implementation. See commentary in dso_lib.cAndy Polyakov
for further details.
2005-12-18commentsUlf Möller
2005-06-09Eliminate gcc -pedantic warnings.Andy Polyakov
2005-06-06_GNU_SOURCE needs to be defined before any standard header.Richard Levitte
2005-06-05New function, DSO_pathbyaddr, to find pathname for loaded shared objectAndy Polyakov
by an address within it. Tested on Linux, Solaris, IRIX, Tru64, Darwin, HP-UX, Win32, few BSD flavors...
2005-05-19fix "dereferencing type-punned pointer will break strict-aliasing rules"Nils Larsch
warning when using gcc 4.0
2005-05-12Avoid warnings.Dr. Stephen Henson
2003-06-12Make sure DSO-dlfcn works properly on SunOS4.Richard Levitte
PR: 585
2003-06-11Add the possibility to have symbols loaded globally with DSO.Richard Levitte
2002-07-15There's an ongoing project to bring some kind of path selectionRichard Levitte
mechanism to the ENGINE framework. This means there there are going to be new functionality for the DSO part, and ultimately some way of merging two file specifications together. This commit places the merging code into the repository. It's currently not used anywhere, and hasn't been tested at all. It may be full of errors, including syntactical ones. Those will be fixed as promptly as possible.
2002-05-29Set DLOPEN_FLAG the same way on NetBSD as on OpenBSD.Richard Levitte
PR: 58, submitted by andrew@cis.uoguelph.ca
2001-11-15At least for the two common Unixly DSO loading methods, include theRichard Levitte
system error in the error text.
2001-04-25This change to the "dl", "dlfcn", and "win32" DSO_METHODs adds the filenameGeoff Thorpe
or symbol name to the error stack in the event a load or bind operation failed.
2000-10-26For the operating systems where it matters, it is sometimes good toRichard Levitte
translate library names by only adding ".so" to them without prepending them with "lib". Add the flag DSO_FLAG_NAME_TRANSLATION_EXT_ONLY for that purpose.
2000-10-26This changes the behaviour of the DSO mechanism for determining anGeoff Thorpe
appropriate filename translation on the host system. Apart from this point, users should also note that there's a slight change in the API functions too. The DSO now contains its own to-be-converted filename ("dso->filename"), and at the time the DSO loads the "dso->loaded_filename" value is set to the translated form. As such, this also provides an impicit way of determining if the DSO is currently loaded or not. Except, perhaps, VMS .... :-) The various DSO_METHODs have been updated for this mechanism except VMS which is deliberately broken for now, Richard is going to look at how to fit it in (the source comments in there explain "the issue"). Basically, the new callback scheme allows the filename conversion to (a) be turned off altogether through the use of the DSO_FLAG_NO_NAME_TRANSLATION flag, (b) be handled in the default way using the default DSO_METHOD's converter (c) overriden per-DSO by setting the override callback (d) a mix of (b) and (c) - eg. implement an override callback that; (i) checks if we're win32 "if(strstr(dso->meth->name, "win32"))..." and if so, convert "blah" into "blah32.dll" (the default is otherwise to make it "blah.dll"). (ii) default to the normal behaviour - eg. we're not on win32, so finish with (return dso->meth->dso_name_converter(dso,NULL)). (e) be retried a number of times by writing a new DSO_METHOD where the "dso_load()" handler will call the converter repeatedly. Then the custom converter could use state information in the DSO to suggest different conversions or paths each time it is invoked.
2000-10-08None of the DSO_METHOD's were handling anything except generic messages.Geoff Thorpe
These are now processed inside DSO_ctrl() itself.
2000-06-21* This adds some checking to the 'dlfcn' DSO_METHOD that at least letsGeoff Thorpe
it cope with OpenBSD which doesn't understand "RTLD_NOW". * Added the dso_scheme config string entry for OpenBSD-x86 to give it DSO support. * 'make update' that has also absorbed some of Steve's mkstack changes for the ASN-related macros.