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