Skip to content

Commit

Permalink
move memwipe to epee to avoid common<->crypto circular dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
moneromooo-monero committed Jan 10, 2018
1 parent 40ab12a commit fdd4c5e
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 12 deletions.
File renamed without changes.
6 changes: 5 additions & 1 deletion contrib/epee/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@
# 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.

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)
if (USE_READLINE AND GNU_READLINE_FOUND)
add_library(epee_readline STATIC readline_buffer.cpp)
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
if (BUILD_GUI_DEPS)
if(IOS)
Expand Down
File renamed without changes.
6 changes: 0 additions & 6 deletions src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ set(common_sources
download.cpp
util.cpp
i18n.cpp
memwipe.c
password.cpp
perf_timer.cpp
threadpool.cpp
Expand Down Expand Up @@ -64,7 +63,6 @@ set(common_private_headers
util.h
varint.h
i18n.h
memwipe.h
password.h
perf_timer.h
stack_trace.h
Expand Down Expand Up @@ -92,9 +90,5 @@ target_link_libraries(common
${OPENSSL_LIBRARIES}
${EXTRA_LIBRARIES})

if(HAVE_C11)
SET_PROPERTY(SOURCE memwipe.c PROPERTY COMPILE_FLAGS -std=c11)
endif()

#monero_install_headers(common
# ${common_headers})
2 changes: 1 addition & 1 deletion src/common/password.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#include "readline_buffer.h"
#endif

#include "common/memwipe.h"
#include "memwipe.h"

namespace
{
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/chacha.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#if defined(__cplusplus)
#include <memory.h>

#include "common/memwipe.h"
#include "memwipe.h"
#include "hash.h"

namespace crypto {
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

#include "common/pod-class.h"
#include "common/util.h"
#include "common/memwipe.h"
#include "memwipe.h"
#include "generic-ops.h"
#include "hex.h"
#include "span.h"
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/wallet2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ using namespace epee;
#include "rapidjson/writer.h"
#include "rapidjson/stringbuffer.h"
#include "common/json_util.h"
#include "common/memwipe.h"
#include "memwipe.h"
#include "common/base58.h"
#include "ringct/rctSigs.h"

Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/memwipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#include <stdint.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
// it works in the normal case
Expand Down

0 comments on commit fdd4c5e

Please sign in to comment.