gloox 1.0
tlsgnutlsclientanon.h
00001 /*
00002   Copyright (c) 2007-2009 by Jakob Schroeter <js@camaya.net>
00003   This file is part of the gloox library. http://camaya.net/gloox
00004 
00005   This software is distributed under a license. The full license
00006   agreement can be found in the file LICENSE in this distribution.
00007   This software may not be copied, modified, sold or distributed
00008   other than expressed in the named license agreement.
00009 
00010   This software is distributed without any warranty.
00011 */
00012 
00013 
00014 
00015 #ifndef TLSGNUTLSCLIENTANON_H__
00016 #define TLSGNUTLSCLIENTANON_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 GnuTLSClientAnon : public GnuTLSBase
00039   {
00040     public:
00045       GnuTLSClientAnon( TLSHandler* th );
00046 
00050       virtual ~GnuTLSClientAnon();
00051 
00052       // reimplemented from TLSBase
00053       virtual bool init( const std::string& clientKey = EmptyString,
00054                          const std::string& clientCerts = EmptyString,
00055                          const StringList& cacerts = StringList() );
00056 
00057       // reimplemented from TLSBase
00058       virtual void cleanup();
00059 
00060     private:
00061       virtual void getCertInfo();
00062 
00063       gnutls_anon_client_credentials_t m_anoncred;
00064   };
00065 
00066 }
00067 
00068 #endif // HAVE_GNUTLS
00069 
00070 #endif // TLSGNUTLSCLIENTANON_H__