Improving my Resource (xxz568)
by Robert Fritzen · in Technical Issues · 04/03/2011 (4:43 pm) · 1 replies
Hello, I'm sure most of you have at least peeked at my authentication resource package using the RSA implementation, now I'd like to improve it to be more secure, by moving the server->client->server handshake on connect to be done in C++.
I have the TS code that runs fine, but now I need to know how to do a few things in C++ to perfect this new process, and of course I will be upgrading the resource thread with this improved method as well, when done.
So, here's what I need to know how to do in C++:
1) When a client connects to the server, call the first command event (server -> client)
2) Send data to the server from this command event (client -> server)
3) Properly make use of torque's "connection event" process to send a "Connect Deny (CR_AUTHERROR)", if something is wrong in the auth process (invalid data).
Hopefully this shouldn't be too much of a hastle, most of the code to validate data is already in C++, I just need to know how to get the C++ to fire off those events from server to client, and client to server.
I have the TS code that runs fine, but now I need to know how to do a few things in C++ to perfect this new process, and of course I will be upgrading the resource thread with this improved method as well, when done.
So, here's what I need to know how to do in C++:
1) When a client connects to the server, call the first command event (server -> client)
2) Send data to the server from this command event (client -> server)
3) Properly make use of torque's "connection event" process to send a "Connect Deny (CR_AUTHERROR)", if something is wrong in the auth process (invalid data).
Hopefully this shouldn't be too much of a hastle, most of the code to validate data is already in C++, I just need to know how to get the C++ to fire off those events from server to client, and client to server.
About the author
Illinois Grad. Retired T3D Developer / Pack Dev.
Torque Owner Robert Fritzen
Phantom Games Development
am I not posting enough info???
Well, I'll expand a bit:
I'm essentially trying to switch one of my ConsoleFunctions to be a NetConnection Method, so I can have the server call it on a client (clientside certificate verification). The Console Function is already coded, so it should be a basic switch over to make it NetConnection::verifyClientSig(arguments).
What I meant is this is already coded (the switch from ConsoleFunction to NetConnection::Blah.
Well, what I want to do from there is communicate from client to server, and back in the engine (C++) (sending var's from the function to another function on the other side).
The other task I wanted to accomplish, was to perform these checks prior to any of the connection methods being called (to prevent game crashing on invalid cert).