summaryrefslogtreecommitdiff
path: root/src/mongo/crypto
diff options
context:
space:
mode:
authorSpencer Jackson <spencer.jackson@mongodb.com>2017-08-24 18:03:27 -0400
committerSpencer Jackson <spencer.jackson@mongodb.com>2017-08-31 10:24:52 -0400
commitebd0ec786e6986ecd407c48928e6866736675021 (patch)
treef5cc2e38086bab8ea445ec93acae7d0e8c7e6a08 /src/mongo/crypto
parent2730bd049022954bc7cd43392be20e6d54cf330d (diff)
downloadmongo-ebd0ec786e6986ecd407c48928e6866736675021.tar.gz
SERVER-30821: Allow configurable use of secure memory
Diffstat (limited to 'src/mongo/crypto')
-rw-r--r--src/mongo/crypto/mechanism_scram.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mongo/crypto/mechanism_scram.h b/src/mongo/crypto/mechanism_scram.h
index b12cebbf2e1..97875394df1 100644
--- a/src/mongo/crypto/mechanism_scram.h
+++ b/src/mongo/crypto/mechanism_scram.h
@@ -33,6 +33,7 @@
#include "mongo/base/secure_allocator.h"
#include "mongo/base/status.h"
#include "mongo/crypto/sha1_block.h"
+#include "mongo/db/auth/authorization_manager.h"
#include "mongo/db/jsobj.h"
namespace mongo {
@@ -97,7 +98,7 @@ public:
// to a callback, which fills the memory.
template <typename T>
explicit SCRAMSecrets(T initializationFun)
- : _ptr(std::make_shared<SecureHandle<SCRAMSecretsHolder>>()) {
+ : _ptr(std::make_shared<SecureAllocatorAuthDomain::SecureHandle<SCRAMSecretsHolder>>()) {
initializationFun((*this)->clientKey, (*this)->storedKey, (*this)->serverKey);
}
@@ -106,20 +107,20 @@ public:
return static_cast<bool>(_ptr);
}
- const SecureHandle<SCRAMSecretsHolder>& operator*() const& {
+ const SecureAllocatorAuthDomain::SecureHandle<SCRAMSecretsHolder>& operator*() const& {
invariant(_ptr);
return *_ptr;
}
void operator*() && = delete;
- const SecureHandle<SCRAMSecretsHolder>& operator->() const& {
+ const SecureAllocatorAuthDomain::SecureHandle<SCRAMSecretsHolder>& operator->() const& {
invariant(_ptr);
return *_ptr;
}
void operator->() && = delete;
private:
- std::shared_ptr<SecureHandle<SCRAMSecretsHolder>> _ptr;
+ std::shared_ptr<SecureAllocatorAuthDomain::SecureHandle<SCRAMSecretsHolder>> _ptr;
};
/*