Skip to content
Snippets Groups Projects
Commit 5c96662e authored by rswindell's avatar rswindell
Browse files

Allow the default CRAM challenge length (16 bytes) to be overridden

(e.g. for experimental purposes) via binkit.ini:
cram_challenge_length = <length in bytes>
parent f2818986
Branches
Tags
No related merge requests found
......@@ -895,6 +895,8 @@ function run_inbound(sock)
bp.want_callback = callout_want_callback;
if (bp.cb_data.binkitcfg.caps !== undefined)
bp.capabilities = bp.cb_data.binkitcfg.caps;
if (bp.cb_data.binkitcfg.cram_challenge_length !== undefined)
bp.cram_challenge_length = bp.cb_data.binkitcfg.cram_challenge_length;
// We can't use the defaults since the defaults are only 4D addresses.
bp.addr_list = [];
......
......@@ -79,6 +79,7 @@ function BinkP(name_ver, inbound, rx_callback, tx_callback)
this.sent_nr = false;
this.ver1_1 = false;
this.require_md5 = true;
this.cram_challenge_length = 16;
this.require_crypt = true;
this.timeout = 120;
this.addr_list = [];
......@@ -523,7 +524,7 @@ BinkP.prototype.accept = function(sock, auth_cb)
return false;
// IREX VER Internet Rex 2.29 Win32 (binkp/1.1) doesn't work with longer challenges
for (i=0; i<32; i++)
for (i=0; i < this.cram_challenge_length * 2; i++)
challenge += random(16).toString(16);
// Avoid warning from syncjslint by putting this in a closure.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment