Skip to content
GitLab
Menu
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
3028ca6c
Commit
3028ca6c
authored
Sep 11, 1998
by
Niels Möller
Browse files
*** empty log message ***
Rev: src/client_keyexchange.h:1.1 Rev: src/connection.c:1.6
parent
6cbbc47a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/client_keyexchange.h
0 → 100644
View file @
3028ca6c
/* client_keyexchange.h
*
* Client specific key exchange handling
*
* $Id$ */
/* lsh, an implementation of the ssh protocol
*
* Copyright (C) 1998 Niels Möller
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef LSH_CLIENT_KEYEXCHANGE_H_INCLUDED
#define LSH_CLIENT_KEYEXCHANGE_H_INCLUDED
#include
"keyexchange.h"
#include
"publickey_crypto.h"
/* Maps a key blob to a signature verifier, using some signature
* algorithm and some method to determine the authenticity of the key.
* Returns NULL If the key is invalid or not trusted. */
struct
lookup_verifier
{
struct
verifier
*
(
*
lookup
)(
struct
lookup_verifier
*
closure
,
struct
lsh_string
*
);
};
#define LOOKUP_VERIFIER(l, key) ((l)->lookup((l), (key)))
struct
dh_algorithm_client
{
struct
keyexchange_algorithm
super
;
struct
diffie_hellman_method
dh
;
struct
hash_algorithm
*
hash
;
struct
lookup_verifier
*
verifier
;
};
/* Handler for the kex_dh_reply message */
struct
dh_client
{
struct
packet_handler
super
;
struct
diffie_hellman_instance
dh
;
struct
hash_instance
*
hash
;
struct
lookup_verifier
*
verifier
;
struct
packet_handler
*
saved_kexinit_handler
;
};
#endif
/* LSH_CLIENT_KEYEXCHANGE_H_INCLUDED */
src/connection.c
View file @
3028ca6c
...
...
@@ -37,14 +37,14 @@ static int handle_connection(struct abstract_write **w,
}
static
int
do_fail
(
struct
packet_handler
*
closure
,
struct
ssh_connection
*
connection
,
struct
lsh_string
*
packet
)
struct
ssh_connection
*
connection
,
struct
lsh_string
*
packet
)
{
lsh_string_free
(
packet
);
return
WRITE_CLOSED
;
}
struct
packet_handler
*
make_fail_handler
()
struct
packet_handler
*
make_fail_handler
()
{
struct
packet_handler
*
res
=
xalloc
(
sizeof
(
struct
packet_handler
));
...
...
Write
Preview
Supports
Markdown
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