The challenge involve partially implementing some of our XMPP test client event handlers for namely join, receive and send. The result will be a client that people can use to join and chat securely. Note that the purpose of the challenge is for the EQ team to get to know the candidates and be comfortable with their C++ competence before commencing our interview process. Please reach out if you get stuck somewhere – this is not considered against you.
Step 1: Get the code and get it compiled:
You need our fork of libgrypt for it:
Then you need to get the code
and follow the README. Finally test with the mock client:
If you link to original libgcrypt you’ll get some kind of grypt related
Step 2: Run the xmpp test client. It is implemented in
Login to two different accounts. try
to chat, etc.
Step 3: Implement the join/send and receive handler
Look at the example at:
Notes that in case of mock client join and receive handler both are being handled by chat_mocker_np1sec_plugin_receive_handler but it happens in different function in case of libpurple.
Step 4: Implement the call backs:
You need to give some call backs to np1sec library. You can find the
association in case of chat mocker here:
mockops->send_bare = send_bare;
mockops->join = new_session_announce;
mockops->leave = new_session_announce;
mockops->display_message = display_message;
mockops->set_timer = set_timer;
mockops->axe_timer = axe_timer;
They are implemented here:
You only need to implement send_bare and send a do nothing functions for set_timer/axe_timer.
Step 5: Test your client:
Follow the lines in
to initiate the np1sec UserState and see if you can join and talk to yourself.