gloox  0.9.9.12
tlsgnutlsserveranon.h
1 /*
2  Copyright (c) 2007-2008 by Jakob Schroeter <js@camaya.net>
3  This file is part of the gloox library. http://camaya.net/gloox
4 
5  This software is distributed under a license. The full license
6  agreement can be found in the file LICENSE in this distribution.
7  This software may not be copied, modified, sold or distributed
8  other than expressed in the named license agreement.
9 
10  This software is distributed without any warranty.
11 */
12 
13 
14 
15 #ifndef TLSGNUTLSSERVERANON_H__
16 #define TLSGNUTLSSERVERANON_H__
17 
18 #include "tlsgnutlsbase.h"
19 
20 #ifdef _WIN32
21 # include "../config.h.win"
22 #elif defined( _WIN32_WCE )
23 # include "../config.h.win"
24 #else
25 # include "config.h"
26 #endif
27 
28 #ifdef HAVE_GNUTLS
29 
30 #include <gnutls/gnutls.h>
31 #include <gnutls/x509.h>
32 
33 namespace gloox
34 {
35 
45  {
46  public:
52 
56  virtual ~GnuTLSServerAnon();
57 
58  // re-implemented from TLSBase
59  virtual void cleanup();
60 
61  private:
62  virtual void init();
63  virtual void getCertInfo();
64  void generateDH();
65 
66  gnutls_anon_server_credentials_t m_anoncred;
67  gnutls_dh_params_t m_dhParams;
68 
69  const int m_dhBits;
70 
71  };
72 
73 }
74 
75 #endif // HAVE_GNUTLS
76 
77 #endif // TLSGNUTLSSERVERANON_H__