- nonce = unhex(rvec[0], &nonce_len);
- res = authhash(nonce, nonce_len, config->password, algo);
+ c->protocol = atoi(protocol);
+ if(c->protocol < 1 || c->protocol > 2) {
+ protocol_error(c, op, c->rc, "%s: %s", c->ident, c->line);
+ disorder_eclient_close(c);
+ return;
+ }
+ nonce = unhex(challenge, &nonce_len);
+ res = authhash(nonce, nonce_len, config->password, algorithm);