From 66723650cab63f541e64145272821984a0f6117e Mon Sep 17 00:00:00 2001 From: lloyd Date: Mon, 22 Dec 2014 01:09:10 +0000 Subject: Fix System_RNG for Windows, fix nmake clean target --- src/build-data/makefile/nmake.in | 2 +- src/lib/rng/system_rng/system_rng.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/build-data/makefile/nmake.in b/src/build-data/makefile/nmake.in index 69c6a24ca..6ce3a536e 100644 --- a/src/build-data/makefile/nmake.in +++ b/src/build-data/makefile/nmake.in @@ -59,7 +59,7 @@ docs: %{build_doc_commands} clean: - $(RM) %{build_dir}\lib\* %{build_dir}\tests\* + $(RM) %{build_dir}\obj\* %{build_dir}\tests\* $(RM) *.manifest *.exp *.dll $(RM) $(LIBRARIES) $(APP) $(TEST) diff --git a/src/lib/rng/system_rng/system_rng.cpp b/src/lib/rng/system_rng/system_rng.cpp index 70222530c..caaa3968a 100644 --- a/src/lib/rng/system_rng/system_rng.cpp +++ b/src/lib/rng/system_rng/system_rng.cpp @@ -56,7 +56,7 @@ System_RNG::System_RNG() { #if defined(BOTAN_TARGET_OS_HAS_CRYPTGENRANDOM) - if(!CryptAcquireContext(&m_prov, 0, 0, RSA_FULL, CRYPT_VERIFYCONTEXT)) + if(!CryptAcquireContext(&m_prov, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) throw std::runtime_error("System_RNG failed to acquire crypto provider"); #else @@ -80,7 +80,7 @@ System_RNG::~System_RNG() void System_RNG::randomize(byte buf[], size_t len) { #if defined(BOTAN_TARGET_OS_HAS_CRYPTGENRANDOM) - ::CryptGenRandom(m_prov, static_cast(len), buf)) + ::CryptGenRandom(m_prov, static_cast(len), buf); #else while(len) { -- cgit v1.2.3