Update with current status
[gnash.git] / cygnal / libnet / sslserver.h
blob548ae1a2f15848740e230a2405ca3cee79476c12
1 //
2 // Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
3 //
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation; either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 #ifndef GNASH_SSL_SERVER_H
20 #define GNASH_SSL_SERVER_H
22 #ifdef HAVE_CONFIG_H
23 #include "gnashconfig.h"
24 #endif
26 #include <cstdint>
27 #include <sstream>
29 #ifdef HAVE_OPENSSL_SSL_H
30 #include <openssl/ssl.h>
31 #include <openssl/err.h>
32 #endif
34 #include "sslclient.h"
35 #include "cque.h"
36 #include "network.h"
37 #include "buffer.h"
39 namespace gnash
42 extern const char *ROOTPATH;
43 extern const char *HOST;
44 extern const char *CA_LIST;
45 extern const char *RANDOM;
46 extern const char *KEYFILE;
47 extern const char *SERVER_KEYFILE;
48 extern const size_t SSL_PASSWD_SIZE;
49 extern const char *PASSWORD;
50 extern const char *DHFILE;
52 class DSOEXPORT SSLServer : public SSLClient {
53 public:
54 SSLServer();
55 ~SSLServer();
57 bool loadDhParams(char *file);
58 bool loadDhParams(SSL_CTX *ctx, char *file);
60 void generateEphRSAKey(SSL_CTX *ctx);
62 // sslAccept() is how the server waits for connections for clients
63 size_t sslAccept(int fd);
65 // display internal data to the terminal
66 void dump();
69 } // end of gnash namespace
71 // end of GNASH_SSL_SERVER_H
72 #endif
74 // local Variables:
75 // mode: C++
76 // indent-tabs-mode: t
77 // End: