ocamerl update: handshake
Code in ocamerl (part of erlocaml) pass the node handshake. Hopefully nobody will read this code before I clean it up a bit ... because right now it is a furious mess!!!
I spent some time (arg, that's a lot in fact) on a stupid (as the bug's author) bug. The (simplified) handshake is a follow:
(in fact the handshake is done with 2 challenges: each node send a challenge to the other)
Anyway, the handshake pass correctly now, and ocaml node can receive the ping control message ... but do not reply yet! after it reply, sure I clean the code!!!
I spent some time (arg, that's a lot in fact) on a stupid (as the bug's author) bug. The (simplified) handshake is a follow:
- the 2 nodes exchange a challenge which is 4 random bytes interpreted as a Int32;
- each node computes the MD5 of (their own cookie + challenge);
- each node compares its result with the digest of the other node.
(in fact the handshake is done with 2 challenges: each node send a challenge to the other)
Anyway, the handshake pass correctly now, and ocaml node can receive the ping control message ... but do not reply yet! after it reply, sure I clean the code!!!
Post imported from wordpress
Please refer to original post for earlier comments.