diff options
author | Amalia Hawkins <amalia.hawkins@10gen.com> | 2014-10-13 11:23:15 -0400 |
---|---|---|
committer | Amalia Hawkins <amalia.hawkins@10gen.com> | 2014-10-15 10:02:32 -0400 |
commit | 8cbf581a2694c496681b8fd12e2cc03747358869 (patch) | |
tree | 6cf62d680bc1064ca06ca6fd1ab1aff35b3dc4f3 /src/mongo/crypto | |
parent | e0f47214d06738f14d0d0d731235a9f665a6b81f (diff) | |
download | mongo-8cbf581a2694c496681b8fd12e2cc03747358869.tar.gz |
SERVER-15198: Make scramIterationCount user configurable
Diffstat (limited to 'src/mongo/crypto')
-rw-r--r-- | src/mongo/crypto/mechanism_scram.cpp | 4 | ||||
-rw-r--r-- | src/mongo/crypto/mechanism_scram.h | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/mongo/crypto/mechanism_scram.cpp b/src/mongo/crypto/mechanism_scram.cpp index 1b6eaf88ea9..d77a0c72b85 100644 --- a/src/mongo/crypto/mechanism_scram.cpp +++ b/src/mongo/crypto/mechanism_scram.cpp @@ -139,10 +139,8 @@ namespace scram { &hashLen)); } - BSONObj generateCredentials(const std::string& hashedPassword) { + BSONObj generateCredentials(const std::string& hashedPassword, int iterationCount) { - // TODO: configure the default iteration count via setParameter - const int iterationCount = 10; const int saltLenQWords = 2; // Generate salt diff --git a/src/mongo/crypto/mechanism_scram.h b/src/mongo/crypto/mechanism_scram.h index fc6da4aea9c..19d7e2b1c8b 100644 --- a/src/mongo/crypto/mechanism_scram.h +++ b/src/mongo/crypto/mechanism_scram.h @@ -69,7 +69,7 @@ namespace scram { * Generates the user salt and the SCRAM secrets storedKey and serverKey as * defined in RFC5802 (server side). */ - BSONObj generateCredentials(const std::string& hashedPassword); + BSONObj generateCredentials(const std::string& hashedPassword, int iterationCount); /* * Computes the ClientProof from SaltedPassword and authMessage (client side). |