ne7ssh_kex.h

00001 /***************************************************************************
00002  *   Copyright (C) 2005-2007 by NetSieben Technologies INC                 *
00003  *   Author: Andrew Useckas                                                *
00004  *   Email: andrew@netsieben.com                                           *
00005  *                                                                         *
00006  *   Windows Port and bugfixes: Keef Aragon <keef@netsieben.com>           *
00007  *                                                                         *
00008  *   This program may be distributed under the terms of the Q Public       *
00009  *   License as defined by Trolltech AS of Norway and appearing in the     *
00010  *   file LICENSE.QPL included in the packaging of this file.              *
00011  *                                                                         *
00012  *   This program is distributed in the hope that it will be useful,       *
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                  *
00015  ***************************************************************************/
00016 
00017 #ifndef NE7SSH_KEX_H
00018 #define NE7SSH_KEX_H
00019 
00020 #include "ne7ssh_types.h"
00021 #include "ne7ssh_session.h"
00022 #include "ne7ssh_string.h"
00023 #include "ne7ssh_transport.h"
00024 #include "crypt.h"
00025 
00029 class ne7ssh_kex
00030 {
00031   private:
00032     ne7ssh_session* session;
00033     ne7ssh_string localKex;
00034     ne7ssh_string remotKex;
00035     ne7ssh_string hostKey;
00036     ne7ssh_string e;
00037     ne7ssh_string f;
00038     ne7ssh_string k;
00039     Botan::SecureVector<Botan::byte> Ciphers, Hmacs;
00040 
00044     void constructLocalKex();
00045 
00050     void makeH (Botan::SecureVector<Botan::byte>& hVector);
00051 
00052   public:
00057     ne7ssh_kex(ne7ssh_session* _session);
00058 
00062     ~ne7ssh_kex();
00063 
00068     bool sendInit();
00069 
00075     bool handleInit();
00076 
00081     bool sendKexDHInit();
00082 
00088     bool handleKexDHReply();
00089 
00095     bool sendKexNewKeys();
00096 
00097 };
00098 
00099 #endif

Generated on Tue May 5 14:10:41 2009 for ne7ssh.kdevelop by  doxygen 1.5.9