Hello.
I am studying Glacier2->Access Control. My program tool is Microsoft VS 2005. I modify the code in demo chat.
When I try SSLPermissionsVerifier,Firstly,in client I create a session with the router like this:Secondly I config the Glacier2 like this:Code:session = ChatSessionPrx::uncheckedCast(_router->createSessionFromSecureConnection());Thirdly,the verifer uses SSLPermissionsVerifierI::authorize function to decide the router whether to accept the connection of client.Code:Glacier2.SSLPermissionsVerifier=verifier:tcp -h 127.0.0.1 -p 10002
My problem is how the authorize function decide which client to accept. I try to write simple code as follows:Is that right? Does the client needs to install a Certificate? If so ,then how to install?Code:bool SSLPermissionsVerifierI::authorize(const Glacier2::SSLInfo& info , std::string& reason, const Ice::Current&) const { if (info.localHost == "192.168.102.65") { cout << "you are permitted!" << endl; return true; } else { reason = "you are not authorized!"; return false; } }
Your answers will do me a good favor,thanks!

Reply With Quote