2 * @file sslproxyserver.h
3 * @brief SSLproxy server Header
5 * Copyright (C) 2008 NTT COMWARE Corporation.
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22 **********************************************************************
24 * Distributed under the Boost Software Licence, Version 1.0
25 * http://www.boost.org/LICENSE_1_0.txt
27 **********************************************************************/
29 #ifndef __SSLPROXYSERVER_H__
30 #define __SSLPROXYSERVER_H__
33 #include "sslproxysession.h"
35 //! SSLproxy session management table.
36 extern std::map<long, int> sessionTable;
37 extern pthread_mutex_t sessionTable_mutex;
42 boost::asio::io_service& sslservice;
43 boost::asio::ip::tcp::acceptor sslacceptor;
44 boost::asio::ssl::context sslcontext;
45 boost::asio::ip::tcp::resolver::iterator target_endpoint_iterator;
46 std::string private_key_passwd;
49 sslproxy_server(boost::asio::io_service& io_service,
50 boost::asio::ip::tcp::resolver::iterator target_itr,
51 boost::asio::ip::tcp::endpoint recv_endpoint);
54 // Get password callback function.
55 std::string get_password();
56 // Acception handling function.
57 void handle_accept(sslproxy_session* session, const boost::system::error_code& error);
60 #endif //__SSLPROXYSERVER_H__