crypto: check protocol version at handshake header

Signed-off-by: Fedor Indutny <fedor@indutny.com>