move memwipe to epee to avoid common<->crypto circular dependencies

This commit is contained in:
moneromooo-monero 2017-12-21 14:51:29 +00:00
parent 40ab12a773
commit fdd4c5e577
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
9 changed files with 10 additions and 12 deletions

View file

@ -26,12 +26,16 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
add_library(epee STATIC hex.cpp http_auth.cpp mlog.cpp net_utils_base.cpp string_tools.cpp wipeable_string.cpp add_library(epee STATIC hex.cpp http_auth.cpp mlog.cpp net_utils_base.cpp string_tools.cpp wipeable_string.cpp memwipe.c
connection_basic.cpp network_throttle.cpp network_throttle-detail.cpp) connection_basic.cpp network_throttle.cpp network_throttle-detail.cpp)
if (USE_READLINE AND GNU_READLINE_FOUND) if (USE_READLINE AND GNU_READLINE_FOUND)
add_library(epee_readline STATIC readline_buffer.cpp) add_library(epee_readline STATIC readline_buffer.cpp)
endif() endif()
if(HAVE_C11)
SET_PROPERTY(SOURCE memwipe.c PROPERTY COMPILE_FLAGS -std=c11)
endif()
# Build and install libepee if we're building for GUI # Build and install libepee if we're building for GUI
if (BUILD_GUI_DEPS) if (BUILD_GUI_DEPS)
if(IOS) if(IOS)

View file

@ -35,7 +35,6 @@ set(common_sources
download.cpp download.cpp
util.cpp util.cpp
i18n.cpp i18n.cpp
memwipe.c
password.cpp password.cpp
perf_timer.cpp perf_timer.cpp
threadpool.cpp threadpool.cpp
@ -64,7 +63,6 @@ set(common_private_headers
util.h util.h
varint.h varint.h
i18n.h i18n.h
memwipe.h
password.h password.h
perf_timer.h perf_timer.h
stack_trace.h stack_trace.h
@ -92,9 +90,5 @@ target_link_libraries(common
${OPENSSL_LIBRARIES} ${OPENSSL_LIBRARIES}
${EXTRA_LIBRARIES}) ${EXTRA_LIBRARIES})
if(HAVE_C11)
SET_PROPERTY(SOURCE memwipe.c PROPERTY COMPILE_FLAGS -std=c11)
endif()
#monero_install_headers(common #monero_install_headers(common
# ${common_headers}) # ${common_headers})

View file

@ -46,7 +46,7 @@
#include "readline_buffer.h" #include "readline_buffer.h"
#endif #endif
#include "common/memwipe.h" #include "memwipe.h"
namespace namespace
{ {

View file

@ -39,7 +39,7 @@
#if defined(__cplusplus) #if defined(__cplusplus)
#include <memory.h> #include <memory.h>
#include "common/memwipe.h" #include "memwipe.h"
#include "hash.h" #include "hash.h"
namespace crypto { namespace crypto {

View file

@ -41,7 +41,7 @@
#include "common/pod-class.h" #include "common/pod-class.h"
#include "common/util.h" #include "common/util.h"
#include "common/memwipe.h" #include "memwipe.h"
#include "generic-ops.h" #include "generic-ops.h"
#include "hex.h" #include "hex.h"
#include "span.h" #include "span.h"

View file

@ -62,7 +62,7 @@ using namespace epee;
#include "rapidjson/writer.h" #include "rapidjson/writer.h"
#include "rapidjson/stringbuffer.h" #include "rapidjson/stringbuffer.h"
#include "common/json_util.h" #include "common/json_util.h"
#include "common/memwipe.h" #include "memwipe.h"
#include "common/base58.h" #include "common/base58.h"
#include "ringct/rctSigs.h" #include "ringct/rctSigs.h"

View file

@ -30,7 +30,7 @@
#include <stdint.h> #include <stdint.h>
#include "misc_log_ex.h" #include "misc_log_ex.h"
#include "common/memwipe.h" #include "memwipe.h"
// Probably won't catch the optimized out case, but at least we test // Probably won't catch the optimized out case, but at least we test
// it works in the normal case // it works in the normal case