Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
6f313a7c
Commit
6f313a7c
authored
7 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
TLS is apparently causing issues, remove it since nobody else supports it
anyway.
parent
952b838f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
exec/load/binkp.js
+3
-28
3 additions, 28 deletions
exec/load/binkp.js
with
3 additions
and
28 deletions
exec/load/binkp.js
+
3
−
28
View file @
6f313a7c
...
...
@@ -90,8 +90,6 @@ function BinkP(name_ver, inbound, rx_callback, tx_callback)
this
.
want_callback
=
this
.
default_want
;
this
.
wont_crypt
=
false
;
this
.
will_crypt
=
false
;
this
.
will_tls
=
false
;
this
.
cant_tls
=
false
;
this
.
in_keys
=
undefined
;
this
.
out_keys
=
undefined
;
this
.
capabilities
=
'
115200,TCP,BINKP
'
;
...
...
@@ -421,12 +419,8 @@ BinkP.prototype.connect = function(addr, password, auth_cb, port, inet_host)
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
;
if
(
password
!==
'
-
'
&&
!
this
.
will_tls
)
if
(
password
!==
'
-
'
)
this
.
sendCmd
(
this
.
command
.
M_NUL
,
"
OPT CRYPT
"
);
else
{
/*
...
...
@@ -558,7 +552,7 @@ BinkP.prototype.accept = function(sock, auth_cb)
this
.
cram
=
{
algo
:
'
MD5
'
,
challenge
:
challenge
.
replace
(
/
[
0-9a-fA-F
]{2}
/g
,
hex2ascii
)};
this
.
authenticated
=
undefined
;
this
.
sendCmd
(
this
.
command
.
M_NUL
,
"
OPT CRAM-MD5-
"
+
challenge
+
(
this
.
wont_crypt
?
""
:
"
CRYPT
"
)
+
"
TLS
"
);
this
.
sendCmd
(
this
.
command
.
M_NUL
,
"
OPT CRAM-MD5-
"
+
challenge
+
(
this
.
wont_crypt
?
""
:
"
CRYPT
"
));
pkt
=
this
.
recvFrame
(
this
.
timeout
);
if
(
pkt
===
undefined
)
return
false
;
...
...
@@ -961,7 +955,6 @@ BinkP.prototype.recvFrame = function(timeout)
var
avail
;
var
nullpos
;
var
buf
;
var
oldctls
=
this
.
cant_tls
;
// Avoid warning from syncjslint by putting this in a closure.
function
hex2ascii
(
hex
)
...
...
@@ -1042,7 +1035,6 @@ BinkP.prototype.recvFrame = function(timeout)
if
(
ret
.
data
.
length
<
ret
.
length
)
this
.
partialFrame
=
ret
;
else
{
this
.
cant_tls
=
true
;
this
.
partialFrame
=
undefined
;
if
(
ret
.
is_cmd
)
{
ret
.
command
=
ret
.
data
.
charCodeAt
(
0
);
...
...
@@ -1119,28 +1111,11 @@ BinkP.prototype.recvFrame = function(timeout)
this
.
nonreliable
=
true
;
break
;
case
'
CRYPT
'
:
if
(
!
this
.
wont_crypt
&&
!
this
.
will_tls
)
{
if
(
!
this
.
wont_crypt
)
{
this
.
will_crypt
=
true
;
log
(
LOG_INFO
,
"
Will encrypt session.
"
);
}
break
;
case
'
TLS
'
:
if
(
oldctls
==
false
)
{
if
(
this
.
outgoing
)
{
this
.
sendCmd
(
this
.
command
.
M_NUL
,
"
OPT TLS
"
);
this
.
sock
.
ssl_session
=
1
;
}
else
this
.
sock
.
ssl_server
=
1
;
this
.
will_tls
=
true
;
this
.
wont_crypt
=
true
;
this
.
require_crypt
=
false
;
this
.
will_crypt
=
false
;
}
else
{
this
.
sendCmd
(
this
.
command
.
M_ERR
,
"
TLS must be negotiated before any other traffic
"
);
return
undefined
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment