Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/SConscript.client
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@ clientSourceSSL = [
'mongo/client/sasl_scramsha1_client_conversation.cpp',
'mongo/crypto/crypto_openssl.cpp',
'mongo/crypto/mechanism_scram.cpp',
'mongo/client/native_sasl_client_session.cpp',
]

clientSourceSasl = [
'mongo/client/cyrus_sasl_client_session.cpp',
'mongo/client/native_sasl_client_session.cpp',
'mongo/client/sasl_sspi.cpp',
]

Expand Down
6 changes: 4 additions & 2 deletions src/mongo/base/initializer_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ INSTALL_FUNCTION(base_init) // "default"
INSTALL_FUNCTION(bson_oid) // "OIDGeneration"
INSTALL_FUNCTION(logger_logstream_builder) // "LogstreamBuilder"
INSTALL_FUNCTION(logger_logger) // "GlobalLogManager"
#ifdef MONGO_SASL
#ifdef MONGO_SSL
INSTALL_FUNCTION(client_sasl_client_authenticate_impl) // "SaslClientAuthenticateFunction"
INSTALL_FUNCTION(client_cyrus_sasl_client_session) // "CyrusSaslAllocatorsAndMutexes,CyrusSaslClientContext"
INSTALL_FUNCTION(client_native_sasl_client_session) // "NativeSaslClientContext"
#endif
#ifdef MONGO_SASL
INSTALL_FUNCTION(client_cyrus_sasl_client_session) // "CyrusSaslAllocatorsAndMutexes,CyrusSaslClientContext"
INSTALL_FUNCTION(client_sasl_sspi) // "SaslSspiClientPlugin,SaslCramClientPlugin,SaslPlainClientPlugin"
#endif
INSTALL_FUNCTION(util_fail_point_service) // "FailPointRegistry,AllFailPointsRegistered"
Expand Down
7 changes: 5 additions & 2 deletions src/mongo/client/dbclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -914,8 +914,11 @@ namespace mongo {
uassertStatusOK(saslClientAuthenticate(this, params));
}
else {
uasserted(ErrorCodes::BadValue,
mechanism + " mechanism support not compiled into client library.");
std::string error = mechanism + " mechanism support not compiled into client library.";
if (mechanism == "SCRAM-SHA-1") {
error += " Client library must be compiled with --ssl";
}
uasserted(ErrorCodes::BadValue, error);
}
};

Expand Down