source: sources/src/ioSsl.inline @ 1439:b23bfdd8a935

Revision 1439:b23bfdd8a935, 2.5 KB checked in by niam, 2 years ago (diff)

change contact info

Line 
1/***************************************************************************
2 *            ioSsl.inline
3 *
4 *  Tue Mar 17 2009
5 *  Copyright  2009  Dmytro Milinevskyy
6 *  milinevskyy@gmail.com
7 ****************************************************************************/
8
9/*
10 *  This program is free software; you can redistribute it and/or modify
11 *  it under the terms of the GNU Lesser General Public License version 2.1 as published by
12 *  the Free Software Foundation;
13 *
14 *  This program is distributed in the hope that it will be useful,
15 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 *  GNU Library General Public License for more details.
18 *
19 *  You should have received a copy of the GNU Lesser General Public License
20 *  along with this program; if not, write to the Free Software
21 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 */
23
24/**
25 * vim indentation settings
26 * set tabstop=4
27 * set shiftwidth=4
28 */
29
30#include <libdodo/directives.h>
31
32#ifdef OPENSSL_EXT
33#include <openssl/ssl.h>
34
35namespace dodo {
36    namespace io {
37        namespace ssl {
38            /**
39             * @struct __connection__
40             * @brief defines internal handlers for SSL
41             */
42            struct __connection__ {
43                /**
44                 * constructor
45                 */
46                __connection__() : handle(NULL)
47                {
48                }
49
50                SSL *handle;        ///< SSL connection handle
51            };
52
53            /**
54             * @struct __context__
55             * @brief defines internal context for SSL
56             */
57            struct __context__ {
58                /**
59                 * constructor
60                 */
61                __context__() : ctx(NULL)
62                {
63                }
64
65                SSL_CTX *ctx;       ///< SSL context
66            };
67
68            /**
69             * @class __openssl___init__
70             * @brief initializes openssl evironment
71             */
72            class __openssl___init__ {
73              public:
74
75                /**
76                 * contructor
77                 */
78                __openssl___init__();
79
80                /**
81                 * destructor
82                 */
83                ~__openssl___init__();
84
85                /**
86                 * add entropy for randomness
87                 */
88                void addEntropy();
89            };
90
91            extern __openssl___init__ __openssl___init_object__;
92        };
93    };
94};
95#endif
96
Note: See TracBrowser for help on using the repository browser.