Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
shrapnel
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
Kirill Smelkov
shrapnel
Commits
03cddd70
Commit
03cddd70
authored
May 06, 2013
by
Sam Rushing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build in a DSS host key
parent
5b5e8bdb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
coro/ssh/test/test_coro_server.py
coro/ssh/test/test_coro_server.py
+25
-1
No files found.
coro/ssh/test/test_coro_server.py
View file @
03cddd70
...
...
@@ -14,6 +14,27 @@ import coro.ssh.util.debug
import
socket
import
coro
from
coro.ssh.keys.openssh_key_storage
import
OpenSSH_Key_Storage
W
=
coro
.
write_stderr
server_key_pri
=
"""-----BEGIN DSA PRIVATE KEY-----
MIIBuwIBAAKBgQDTfwvvQo0WnUmZpnUFmqF/TXSXFaJ1NKbBLQXPh8dhHgTN1uFO
ZibFXMKpDHLCGCdGRm5eHansB9hu2+nNoaFf3oLDHc8ctuE7xRHT8x174D2AxcnX
r0Fw3BnZHj58lLlhayDJ4S6W77yefGEOuo/wKUEPjAUBCrvxKq3bKAeVUQIVAPpR
bJO1QQZPlj4w+MXmRTgW7wGfAoGAVUkBIX+RLrh9guyiAadi9xGk8S7n5w2PbcsP
KTG8x/ttCDEuaBp6El6qt86cA+M2GPvXjuMGR5BQT8IOaWS7Aw2+J1IamLCsrPfq
oiQvz3cqxOAutuIuorzbIAgVo0hiAyovZE4u2zzKeci7OtfD8pRThSby4Dgbkeix
FQFhW08CgYBSxcduHDSqJTCjFK4hwTlNck4h2hC1E4xuMfxYsUZkLrBAsD3nzU2W
jNoZppTz3W8XC7YnTxonncXNWxCWsDWpvs0b2zGj7uUvGRtlyxtQpybyN3LZ0flo
DssTygy7t0KlS7T2a1IhqiVDbrSUoGXz+Wp/z66lCpSLTlPsGpLeLwIVAMQldwwH
OekNfzzIBr6QkMvmIOuL
-----END DSA PRIVATE KEY-----
"""
ks
=
OpenSSH_Key_Storage
()
dss_obj
=
ks
.
parse_private_key
(
server_key_pri
)
def
usage
():
print
'test_coro_server [-p port]'
...
...
@@ -47,9 +68,12 @@ def go (conn, addr):
debug
=
coro
.
ssh
.
util
.
debug
.
Debug
()
debug
.
level
=
coro
.
ssh
.
util
.
debug
.
DEBUG_3
transport
=
coro
.
ssh
.
l4_transport
.
coro_socket_transport
.
coro_socket_transport
(
sock
=
conn
)
server
=
coro
.
ssh
.
transport
.
server
.
SSH_Server_Transport
(
debug
=
debug
)
server
=
coro
.
ssh
.
transport
.
server
.
SSH_Server_Transport
(
d
ss_obj
,
d
ebug
=
debug
)
server
.
connect
(
transport
)
W
(
'after server.connect()
\
n
'
)
service
=
coro
.
ssh
.
connection
.
connect
.
Connection_Service
(
server
)
W
(
'service=%r
\
n
'
%
(
service
,))
W
(
'sleeping...
\
n
'
)
coro
.
sleep_relative
(
1000
)
def
main
():
...
...
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