Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re6stnet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
re6stnet
Commits
8e3cc1ea
Commit
8e3cc1ea
authored
Aug 25, 2016
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify description of protocol between nodes
parent
9be8cf80
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
re6st/tunnel.py
re6st/tunnel.py
+2
-2
re6st/x509.py
re6st/x509.py
+4
-5
No files found.
re6st/tunnel.py
View file @
8e3cc1ea
...
...
@@ -372,7 +372,7 @@ class BaseTunnelManager(object):
self
.
_makeTunnel
(
peer
,
msg
)
else
:
return
';'
.
join
(
self
.
_address
.
itervalues
())
elif
not
code
:
#
ver
elif
not
code
:
#
network version
if
peer
:
try
:
if
msg
==
self
.
_version
:
...
...
@@ -402,7 +402,7 @@ class BaseTunnelManager(object):
else
:
if
code
==
3
and
tunnel_killer
.
state
==
'locked'
:
# response
self
.
_kill
(
peer
)
elif
code
==
4
:
elif
code
==
4
:
# node information
if
not
msg
:
return
version
.
version
elif
code
==
5
:
...
...
re6st/x509.py
View file @
8e3cc1ea
# -*- coding: utf-8 -*-
import
calendar
,
hashlib
,
hmac
,
logging
,
os
,
struct
,
subprocess
,
threading
,
time
from
collections
import
deque
from
datetime
import
datetime
from
OpenSSL
import
crypto
from
.
import
utils
...
...
@@ -164,12 +163,12 @@ class Peer(object):
hello0: 0, A
1, fingerprint(B), A
hello: 2, X =
E(B)(secret), S(A)(
X)
!hello: #,
ver, type, value, HMAC(secret)(
payload)
└──
── payload ──
──┘
hello: 2, X =
encrypt(B, secret), sign(A,
X)
!hello: #,
type, value, hmac(secret,
payload)
└──
payload
──┘
new secret > old secret
(
concat timestamp with
random bits)
(
timestamp +
random bits)
Reject messages with # smaller or equal than previously processed.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment