Adam Tkac | dfe19cf | 2010-04-23 14:14:11 +0000 | [diff] [blame^] | 1 | /*
|
| 2 | * Copyright (C) 2004 Red Hat Inc.
|
| 3 | * Copyright (C) 2005 Martin Koegler
|
| 4 | * Copyright (C) 2010 TigerVNC Team
|
| 5 | *
|
| 6 | * This is free software; you can redistribute it and/or modify
|
| 7 | * it under the terms of the GNU General Public License as published by
|
| 8 | * the Free Software Foundation; either version 2 of the License, or
|
| 9 | * (at your option) any later version.
|
| 10 | *
|
| 11 | * This software is distributed in the hope that it will be useful,
|
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 14 | * GNU General Public License for more details.
|
| 15 | *
|
| 16 | * You should have received a copy of the GNU General Public License
|
| 17 | * along with this software; if not, write to the Free Software
|
| 18 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
| 19 | * USA.
|
| 20 | */
|
| 21 |
|
| 22 | #ifndef __S_SECURITY_TLS_H__
|
| 23 | #define __S_SECURITY_TLS_H__
|
| 24 |
|
| 25 | #ifdef HAVE_CONFIG_H
|
| 26 | #include <config.h>
|
| 27 | #endif
|
| 28 |
|
| 29 | #ifdef HAVE_GNUTLS
|
| 30 |
|
| 31 | #include <rfb/SSecurityTLSBase.h>
|
| 32 | #include <rfb/SSecurityVeNCrypt.h>
|
| 33 |
|
| 34 | namespace rfb {
|
| 35 |
|
| 36 | class SSecurityTLS : public SSecurityTLSBase {
|
| 37 | public:
|
| 38 | SSecurityTLS();
|
| 39 | virtual ~SSecurityTLS();
|
| 40 | virtual int getType() const {return secTypeTLSNone;}
|
| 41 | protected:
|
| 42 | virtual void freeResources();
|
| 43 | virtual void setParams(gnutls_session session);
|
| 44 |
|
| 45 | private:
|
| 46 | static void initGlobal();
|
| 47 |
|
| 48 | gnutls_dh_params dh_params;
|
| 49 | gnutls_anon_server_credentials anon_cred;
|
| 50 | };
|
| 51 |
|
| 52 | }
|
| 53 | #endif /* HAVE_GNUTLS */
|
| 54 |
|
| 55 | #endif /* __S_SECURITY_TLS_H__ */
|