diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-08-24 03:06:32 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-08-24 03:06:32 +0200 |
commit | 84a5ceeb7db03d75425d72e8a23a0bb0f267bc01 (patch) | |
tree | 7a7702429a7cdbc06144b2141eb80ee2aa462d39 /src/Server | |
parent | 415cd36477e152c12f91a10ad61bb719373cd9d1 (diff) | |
download | mad-84a5ceeb7db03d75425d72e8a23a0bb0f267bc01.tar mad-84a5ceeb7db03d75425d72e8a23a0bb0f267bc01.zip |
Hash-Klasse hinzugefügt
Diffstat (limited to 'src/Server')
-rw-r--r-- | src/Server/ConnectionManager.cpp | 8 | ||||
-rw-r--r-- | src/Server/ConnectionManager.h | 4 | ||||
-rw-r--r-- | src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/Server/ConnectionManager.cpp b/src/Server/ConnectionManager.cpp index e52e8c4..c49e7e8 100644 --- a/src/Server/ConnectionManager.cpp +++ b/src/Server/ConnectionManager.cpp @@ -58,11 +58,11 @@ bool ConnectionManager::ServerConnection::disconnect() { } boost::shared_ptr<const Common::AuthContext> ConnectionManager::ServerConnection::authenticate(const std::string &method, - const std::string &user, const std::vector<boost::uint8_t> &challenge, std::vector<boost::uint8_t> &response) { + const std::string &user, const std::vector<boost::uint8_t> &data, std::vector<boost::uint8_t> &response) { if(!isIdentified()) type = CLIENT; - authContext = application->getAuthManager()->authenticate(method, user, challenge, response, authContext); + authContext = application->getAuthManager()->authenticate(method, user, data, response, authContext); return authContext; } @@ -294,7 +294,7 @@ void ConnectionManager::identifyDaemonConnection(Common::Connection *con, const } boost::shared_ptr<const Common::AuthContext> ConnectionManager::authenticateConnection(Common::Connection *con, const std::string &method, - const std::string &user, const std::vector<boost::uint8_t> &challenge, std::vector<boost::uint8_t> &response) { + const std::string &user, const std::vector<boost::uint8_t> &data, std::vector<boost::uint8_t> &response) { // TODO Logging ServerConnection *connection = dynamic_cast<ServerConnection*>(con); @@ -305,7 +305,7 @@ boost::shared_ptr<const Common::AuthContext> ConnectionManager::authenticateConn if(!connection->isIdentified()) connection->identify(); - return connection->authenticate(method, user, challenge, response); + return connection->authenticate(method, user, data, response); } std::vector<Common::HostInfo> ConnectionManager::getDaemonList() const { diff --git a/src/Server/ConnectionManager.h b/src/Server/ConnectionManager.h index e045a6a..067ce28 100644 --- a/src/Server/ConnectionManager.h +++ b/src/Server/ConnectionManager.h @@ -102,7 +102,7 @@ class MAD_SERVER_EXPORT ConnectionManager : public Core::Configurable, private b } boost::shared_ptr<const Common::AuthContext> authenticate(const std::string &method, const std::string &user, - const std::vector<boost::uint8_t> &challenge, std::vector<boost::uint8_t> &response); + const std::vector<boost::uint8_t> &data, std::vector<boost::uint8_t> &response); }; friend class Application; @@ -143,7 +143,7 @@ class MAD_SERVER_EXPORT ConnectionManager : public Core::Configurable, private b void identifyDaemonConnection(Common::Connection *con, const std::string &name) throw (Core::Exception); boost::shared_ptr<const Common::AuthContext> authenticateConnection(Common::Connection *con, const std::string &method, - const std::string &user, const std::vector<boost::uint8_t> &challenge, std::vector<boost::uint8_t> &response); + const std::string &user, const std::vector<boost::uint8_t> &data, std::vector<boost::uint8_t> &response); bool isAuthenticated(Common::Connection *con) const; diff --git a/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp b/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp index b59cc3d..37e2e79 100644 --- a/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp +++ b/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp @@ -51,10 +51,10 @@ void ConnectionRequestHandlerGroup::handleAuthRequest(boost::shared_ptr<const Co boost::shared_ptr<const Common::AuthContext> authContext = application->getConnectionManager()->authenticateConnection(connection, packet->get<const std::string&>("method"), packet->get<const std::string&>("user"), - packet->get<const std::vector<boost::uint8_t>&>("challenge"), response); + packet->get<const std::vector<boost::uint8_t>&>("data"), response); if(!response.empty()) - ret->set("response", response); + ret->set("data", response); if(authContext->isAuthenticated()) ret->setType("OK"); @@ -109,7 +109,7 @@ void ConnectionRequestHandlerGroup::handleLogRequest(boost::shared_ptr<const Com application->getConnectionManager()->getDaemonName(connection)); } catch(Core::Exception &e) { - application->logf(Core::LoggerBase::LOG_ERROR, "Can't determine daemon name: %s", e.strerror().c_str()); + application->logf(Core::LoggerBase::LOG_ERROR, "Can't determine daemon name: %s", e.what()); } ret->setType("OK"); |