1/*
2 * This file is part of the SSH Library
3 *
4 * Copyright (c) 2009 by Aris Adamantiadis
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#ifndef KEX_H_
22#define KEX_H_
23
24#include "libssh/priv.h"
25#include "libssh/callbacks.h"
26
27#define SSH_KEX_METHODS 10
28
29struct ssh_kex_struct {
30 unsigned char cookie[16];
31 char *methods[SSH_KEX_METHODS];
32};
33
34SSH_PACKET_CALLBACK(ssh_packet_kexinit);
35#ifdef WITH_SSH1
36SSH_PACKET_CALLBACK(ssh_packet_publickey1);
37#endif
38
39int ssh_send_kex(ssh_session session, int server_kex);
40void ssh_list_kex(struct ssh_kex_struct *kex);
41int set_client_kex(ssh_session session);
42int ssh_kex_select_methods(ssh_session session);
43int verify_existing_algo(int algo, const char *name);
44char **space_tokenize(const char *chain);
45int ssh_get_kex1(ssh_session session);
46char *ssh_find_matching(const char *in_d, const char *what_d);
47const char *ssh_kex_get_supported_method(uint32_t algo);
48const char *ssh_kex_get_description(uint32_t algo);
49
50#endif /* KEX_H_ */
51