tlsgnutlsserveranon.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef TLSGNUTLSSERVERANON_H__
00016 #define TLSGNUTLSSERVERANON_H__
00017
00018 #include "tlsgnutlsbase.h"
00019
00020 #include "config.h"
00021
00022 #ifdef HAVE_GNUTLS
00023
00024 #include <gnutls/gnutls.h>
00025 #include <gnutls/x509.h>
00026
00027 namespace gloox
00028 {
00029
00038 class GnuTLSServerAnon : public GnuTLSBase
00039 {
00040 public:
00045 GnuTLSServerAnon( TLSHandler* th );
00046
00050 virtual ~GnuTLSServerAnon();
00051
00052
00053 virtual bool init( const std::string& clientKey = EmptyString,
00054 const std::string& clientCerts = EmptyString,
00055 const StringList& cacerts = StringList() );
00056
00057
00058 virtual void cleanup();
00059
00060 private:
00061 virtual void getCertInfo();
00062 void generateDH();
00063
00064 gnutls_anon_server_credentials_t m_anoncred;
00065 gnutls_dh_params_t m_dhParams;
00066
00067 const int m_dhBits;
00068
00069 };
00070
00071 }
00072
00073 #endif // HAVE_GNUTLS
00074
00075 #endif // TLSGNUTLSSERVERANON_H__