Commit f3d849a0 authored by deuce's avatar deuce
Browse files

We need to send M_NUL "OPT TLS" before M_NUL "OPT CRYPT".

parent 6c35737e
...@@ -406,8 +406,12 @@ BinkP.prototype.connect = function(addr, password, auth_cb, port, inet_host) ...@@ -406,8 +406,12 @@ BinkP.prototype.connect = function(addr, password, auth_cb, port, inet_host)
return false; return false;
} }
/* Check if the first remote comand is an M_NUL "OPT TLS" */
pkt = this.recvFrame(this.timeout);
if (pkt === undefined)
return false;
this.authenticated = undefined; this.authenticated = undefined;
if (password !== '-') if (password !== '-' && !this.will_tls)
this.sendCmd(this.command.M_NUL, "OPT CRYPT"); this.sendCmd(this.command.M_NUL, "OPT CRYPT");
else { else {
/* /*
...@@ -421,10 +425,6 @@ BinkP.prototype.connect = function(addr, password, auth_cb, port, inet_host) ...@@ -421,10 +425,6 @@ BinkP.prototype.connect = function(addr, password, auth_cb, port, inet_host)
this.wont_crypt = true; this.wont_crypt = true;
this.require_crypt = false; this.require_crypt = false;
} }
/* Check if the first remote comand is an M_NUL "OPT TLS" */
pkt = this.recvFrame(this.timeout);
if (pkt === undefined)
return false;
this.sendCmd(this.command.M_NUL, "SYS "+this.system_name); this.sendCmd(this.command.M_NUL, "SYS "+this.system_name);
this.sendCmd(this.command.M_NUL, "ZYZ "+this.system_operator); this.sendCmd(this.command.M_NUL, "ZYZ "+this.system_operator);
this.sendCmd(this.command.M_NUL, "LOC "+this.system_location); this.sendCmd(this.command.M_NUL, "LOC "+this.system_location);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment