|
libssh
0.7.2
|
00001 /* 00002 * This file is part of the SSH Library 00003 * 00004 * Copyright (c) 2009 by Aris Adamantiadis 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00019 */ 00020 00021 #ifndef DH_H_ 00022 #define DH_H_ 00023 00024 #include "config.h" 00025 00026 #include "libssh/crypto.h" 00027 00028 int dh_generate_e(ssh_session session); 00029 int dh_generate_f(ssh_session session); 00030 int dh_generate_x(ssh_session session); 00031 int dh_generate_y(ssh_session session); 00032 00033 int ssh_crypto_init(void); 00034 void ssh_crypto_finalize(void); 00035 00036 ssh_string dh_get_e(ssh_session session); 00037 ssh_string dh_get_f(ssh_session session); 00038 int dh_import_f(ssh_session session,ssh_string f_string); 00039 int dh_import_e(ssh_session session, ssh_string e_string); 00040 void dh_import_pubkey(ssh_session session,ssh_string pubkey_string); 00041 int dh_build_k(ssh_session session); 00042 int ssh_client_dh_init(ssh_session session); 00043 int ssh_client_dh_reply(ssh_session session, ssh_buffer packet); 00044 00045 int make_sessionid(ssh_session session); 00046 /* add data for the final cookie */ 00047 int hashbufin_add_cookie(ssh_session session, unsigned char *cookie); 00048 int hashbufout_add_cookie(ssh_session session); 00049 int generate_session_keys(ssh_session session); 00050 00051 #endif /* DH_H_ */
1.7.5.1