From 73bc1a0e389854f44a49b8224acff9472ba50aa6 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sun, 18 Sep 2016 08:52:10 -0400 Subject: [PATCH] Add information on static linking and risk with dynamic runtime linking --- Install.txt | 3 +++ Readme.txt | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Install.txt b/Install.txt index 21367dd22..03ec65584 100644 --- a/Install.txt +++ b/Install.txt @@ -73,6 +73,8 @@ The makefile orders object files to help remediate problems associated with C++ If your linker supports initialization attributes, like init_priority, then you can define CRYPTOPP_INIT_PRIORITY to control object initialization order. Set it to a value like 250. User programs can use CRYPTOPP_USER_PRIORITY to avoid conflicts with library values. Initialization attributes are more reliable than object file ordering, but its not ubiquitously supported by linkers. +The makefile links to the static version of the Crypto++ library to avoid binary planting and other LD_PRELOAD tricks. You should use the static version of the library in your programs to help avoid unwanted redirections. + INSTALLING THE LIBRARY ---------------------- @@ -174,6 +176,7 @@ Fifth, the test harness provides a "test vector" option which uses many known te The library also offers its test script for those who want to use it. The test script is names cryptest.sh, and it repeatedly builds the library and exectues the tests under various configurations. It takes 2 to 4 hours to run on a semi-modern desktop or server; and days to run on an IoT gadget. Also see http://github.com/weidai11/cryptopp/blob/master/cryptest.sh and http://cryptopp.com/wiki/Cryptest.sh. + REPORTING PROBLEMS ------------------ diff --git a/Readme.txt b/Readme.txt index 27c5cc44c..2bcd12ba4 100644 --- a/Readme.txt +++ b/Readme.txt @@ -114,7 +114,7 @@ all three forms, and sample applications using each of the three forms are also included. To compile Crypto++ with MSVC, open "cryptest.sln" (for MSVC 2005 - 2015) -or "cryptest.dsw" (for MSVC 6 and MSVC .NET 2003) workspace file and build +or "cryptest.dsw" (for MSVC 6 - MSVC .NET 2003) workspace file and build one or more of the following projects: cryptdll - This builds the DLL. Please note that if you wish to use Crypto++ @@ -193,6 +193,10 @@ value like 250. User programs can use CRYPTOPP_USER_PRIORITY to avoid conflicts library values. Initialization attributes are more reliable than object file ordering, but its not ubiquitously supported by linkers. +The makefile links to the static version of the Crypto++ library to avoid binary +planting and other LD_PRELOAD tricks. You should use the static version of the +library in your programs to help avoid unwanted redirections. + *** Documentation and Support *** Crypto++ is documented through inline comments in header files, which are