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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joanne Hugé
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
Show 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):
...
@@ -372,7 +372,7 @@ class BaseTunnelManager(object):
self
.
_makeTunnel
(
peer
,
msg
)
self
.
_makeTunnel
(
peer
,
msg
)
else
:
else
:
return
';'
.
join
(
self
.
_address
.
itervalues
())
return
';'
.
join
(
self
.
_address
.
itervalues
())
elif
not
code
:
#
ver
elif
not
code
:
#
network version
if
peer
:
if
peer
:
try
:
try
:
if
msg
==
self
.
_version
:
if
msg
==
self
.
_version
:
...
@@ -402,7 +402,7 @@ class BaseTunnelManager(object):
...
@@ -402,7 +402,7 @@ class BaseTunnelManager(object):
else
:
else
:
if
code
==
3
and
tunnel_killer
.
state
==
'locked'
:
# response
if
code
==
3
and
tunnel_killer
.
state
==
'locked'
:
# response
self
.
_kill
(
peer
)
self
.
_kill
(
peer
)
elif
code
==
4
:
elif
code
==
4
:
# node information
if
not
msg
:
if
not
msg
:
return
version
.
version
return
version
.
version
elif
code
==
5
:
elif
code
==
5
:
...
...
re6st/x509.py
View file @
8e3cc1ea
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
import
calendar
,
hashlib
,
hmac
,
logging
,
os
,
struct
,
subprocess
,
threading
,
time
import
calendar
,
hashlib
,
hmac
,
logging
,
os
,
struct
,
subprocess
,
threading
,
time
from
collections
import
deque
from
datetime
import
datetime
from
datetime
import
datetime
from
OpenSSL
import
crypto
from
OpenSSL
import
crypto
from
.
import
utils
from
.
import
utils
...
@@ -164,12 +163,12 @@ class Peer(object):
...
@@ -164,12 +163,12 @@ class Peer(object):
hello0: 0, A
hello0: 0, A
1, fingerprint(B), A
1, fingerprint(B), A
hello: 2, X =
E(B)(secret), S(A)(
X)
hello: 2, X =
encrypt(B, secret), sign(A,
X)
!hello: #,
ver, type, value, HMAC(secret)(
payload)
!hello: #,
type, value, hmac(secret,
payload)
└──
── payload ──
──┘
└──
payload
──┘
new secret > old secret
new secret > old secret
(
concat timestamp with
random bits)
(
timestamp +
random bits)
Reject messages with # smaller or equal than previously processed.
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