Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
LSH
lsh
Commits
840f4e4d
Commit
840f4e4d
authored
Sep 14, 1998
by
Niels Möller
Browse files
*** empty log message ***
Rev: src/keyexchange.c:1.9 Rev: src/keyexchange.h:1.10 Rev: src/read_packet.h:1.6
parent
225d8060
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/keyexchange.c
View file @
840f4e4d
...
...
@@ -195,7 +195,7 @@ static int do_handle_kexinit(struct packet_hander *c,
return
0
;
/* Save value for later signing */
connection
->
literal_kexinits
[
connection
->
type
]
=
packet
;
connection
->
literal_kexinits
[
!
connection
->
type
]
=
packet
;
connection
->
kexinits
[
!
connection
->
type
]
=
msg
;
...
...
@@ -203,9 +203,13 @@ static int do_handle_kexinit(struct packet_hander *c,
if
(
!
connection
->
kexinits
[
connection
->
type
])
{
int
res
;
struct
lsh_string
*
packet
;
struct
kexinit
*
sent
=
GENERATE_KEXINIT
(
closure
->
init
);
connection
->
kexinits
[
connection
->
type
]
=
sent
;
res
=
A_WRITE
(
connection
->
write
,
format_kex
(
sent
));
packet
=
format_kex
(
sent
);
connection
->
kexinits
[
connection
->
type
]
=
lsh_string_dup
(
packet
);
res
=
A_WRITE
(
connection
->
write
,
packet
);
if
(
res
!=
WRITE_OK
)
return
res
;
}
...
...
@@ -242,6 +246,7 @@ static int do_handle_kexinit(struct packet_hander *c,
hostkey_algorithm
=
select_algorithm
(
connection
->
kexinits
[
0
]
->
server_hostkey_algorithms
,
connection
->
kexinits
[
1
]
->
server_hostkey_algorithms
);
for
(
i
=
0
;
i
<
KEX_PARAMETERS
;
i
++
)
{
parameters
[
i
]
...
...
@@ -251,7 +256,7 @@ static int do_handle_kexinit(struct packet_hander *c,
if
(
!
parameters
[
i
])
{
send_disconnect
(
connection
,
""
);
return
w
RITE_CLOSED
;
return
W
RITE_CLOSED
;
}
}
...
...
src/keyexchange.h
View file @
840f4e4d
...
...
@@ -42,12 +42,14 @@
struct
keyexchange_algorithm
{
int
(
*
init
)(
struct
keyexchange_algorithm
*
closure
,
struct
ssh_connection
*
connection
);
struct
ssh_connection
*
connection
,
struct
signature_algorithm
*
hostkey_algorithm
,
void
**
algorithms
);
};
#define KEYEXCHANGE_INIT(kex, connection) \
#define KEYEXCHANGE_INIT(kex, connection
,
) \
((kex)->init((kex), (connection)))
struct
kexinit
{
UINT8
cookie
[
16
];
...
...
src/read_packet.h
View file @
840f4e4d
...
...
@@ -28,7 +28,6 @@
#include
"abstract_io.h"
#include
"abstract_crypto.h"
#include
"newkeys.h"
struct
read_packet
{
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment