From eb3435c25eabc90e2c4ff7c331c94c4c222d0b7e Mon Sep 17 00:00:00 2001 From: Andreas Nilsson Date: Tue, 7 Oct 2014 16:59:05 -0400 Subject: SERVER-15236 Using SCRAM-SHA-1 for keyfile authentication --- src/mongo/db/auth/sasl_scramsha1_server_conversation.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mongo/db/auth/sasl_scramsha1_server_conversation.cpp') diff --git a/src/mongo/db/auth/sasl_scramsha1_server_conversation.cpp b/src/mongo/db/auth/sasl_scramsha1_server_conversation.cpp index 7631372bd17..791fe137b11 100644 --- a/src/mongo/db/auth/sasl_scramsha1_server_conversation.cpp +++ b/src/mongo/db/auth/sasl_scramsha1_server_conversation.cpp @@ -159,10 +159,10 @@ namespace mongo { // Generate SCRAM credentials on the fly for mixed MONGODB-CR/SCRAM mode. if (_creds.scram.salt.empty() && !_creds.password.empty()) { BSONObj scramCreds = scram::generateCredentials(_creds.password); - _creds.scram.iterationCount = scramCreds["iterationCount"].Int(); - _creds.scram.salt = scramCreds["salt"].String(); - _creds.scram.storedKey = scramCreds["storedKey"].String(); - _creds.scram.serverKey = scramCreds["serverKey"].String(); + _creds.scram.iterationCount = scramCreds[scram::iterationCountFieldName].Int(); + _creds.scram.salt = scramCreds[scram::saltFieldName].String(); + _creds.scram.storedKey = scramCreds[scram::storedKeyFieldName].String(); + _creds.scram.serverKey = scramCreds[scram::serverKeyFieldName].String(); } // Generate server-first-message -- cgit v1.2.1