aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/crypto.h
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-08-22 20:32:55 -0500
committerluigi1111 <luigi1111w@gmail.com>2018-08-22 20:32:55 -0500
commit13a34faeb09814121140e14e0af442714fa985f9 (patch)
treea9ae5deea2a54c57391752089a42aea3954bac04 /src/crypto/crypto.h
parentMerge pull request #4105 (diff)
parentcrypto: make secret_key automatically mlock (diff)
downloadmonero-13a34faeb09814121140e14e0af442714fa985f9.tar.xz
Merge pull request #4131
ea37614 wallet: wipe seed from memory where appropriate (moneromooo-monero) e9ffa91 store secret keys encrypted where possible (moneromooo-monero) 70271fa common: add a class to safely wrap mlock/munlock (moneromooo-monero) ab74dc2 crypto: make secret_key automatically mlock (moneromooo-monero)
Diffstat (limited to 'src/crypto/crypto.h')
-rw-r--r--src/crypto/crypto.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/crypto/crypto.h b/src/crypto/crypto.h
index a2d61b04e..c1576a218 100644
--- a/src/crypto/crypto.h
+++ b/src/crypto/crypto.h
@@ -41,6 +41,7 @@
#include "common/pod-class.h"
#include "common/util.h"
#include "memwipe.h"
+#include "mlocker.h"
#include "generic-ops.h"
#include "hex.h"
#include "span.h"
@@ -65,7 +66,7 @@ namespace crypto {
friend class crypto_ops;
};
- using secret_key = tools::scrubbed<ec_scalar>;
+ using secret_key = epee::mlocked<tools::scrubbed<ec_scalar>>;
POD_CLASS public_keyV {
std::vector<public_key> keys;