diff options
author | Jack Lloyd <[email protected]> | 2017-08-31 14:33:26 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-08-31 14:33:26 -0400 |
commit | 5566798e8e5cd0520ba6110bb7d256c0c851d84f (patch) | |
tree | 26c5ef3427badb349b2558d72cb3133b7c5fc87a /src/lib/entropy | |
parent | ae5baecf626c925f14545a45290fa83628f1961c (diff) |
Fix missing virtual destructor on CSP_Handle
Caught by GCC cross compiling. Also fix a couple 0-as-null warnings.
Diffstat (limited to 'src/lib/entropy')
-rw-r--r-- | src/lib/entropy/cryptoapi_rng/es_capi.cpp | 4 | ||||
-rw-r--r-- | src/lib/entropy/cryptoapi_rng/es_capi.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/entropy/cryptoapi_rng/es_capi.cpp b/src/lib/entropy/cryptoapi_rng/es_capi.cpp index 3d744245e..58503c66d 100644 --- a/src/lib/entropy/cryptoapi_rng/es_capi.cpp +++ b/src/lib/entropy/cryptoapi_rng/es_capi.cpp @@ -22,8 +22,8 @@ class CSP_Handle_Impl : public Win32_CAPI_EntropySource::CSP_Handle explicit CSP_Handle_Impl(uint64_t capi_provider) { m_valid = ::CryptAcquireContext(&m_handle, - 0, - 0, + nullptr, + nullptr, static_cast<DWORD>(capi_provider), CRYPT_VERIFYCONTEXT); } diff --git a/src/lib/entropy/cryptoapi_rng/es_capi.h b/src/lib/entropy/cryptoapi_rng/es_capi.h index 79a42828d..8439e62fa 100644 --- a/src/lib/entropy/cryptoapi_rng/es_capi.h +++ b/src/lib/entropy/cryptoapi_rng/es_capi.h @@ -32,6 +32,7 @@ class Win32_CAPI_EntropySource final : public Entropy_Source class CSP_Handle { public: + virtual ~CSP_Handle() {} virtual size_t gen_random(uint8_t out[], size_t n) const = 0; }; private: |