Adam Tkac | 5522d61 | 2010-08-11 15:28:01 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2005-2006 Martin Koegler |
| 3 | * Copyright (C) 2006 OCCAM Financial Technology |
| 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 | // SSecurityVeNCrypt |
| 23 | // |
| 24 | |
| 25 | #ifndef __SSECURITYVENCRYPT_H__ |
| 26 | #define __SSECURITYVENCRYPT_H__ |
| 27 | |
| 28 | #ifdef HAVE_CONFIG_H |
| 29 | #include <config.h> |
| 30 | #endif |
| 31 | |
| 32 | #include <rfb/SSecurityStack.h> |
| 33 | #include <rfb/SConnection.h> |
| 34 | |
| 35 | namespace rfb { |
| 36 | |
| 37 | class SSecurityVeNCrypt : public SSecurity { |
| 38 | public: |
Pierre Ossman | ad2b3c4 | 2018-09-21 15:31:11 +0200 | [diff] [blame^] | 39 | SSecurityVeNCrypt(SConnection* sc, SecurityServer *sec); |
Adam Tkac | 5522d61 | 2010-08-11 15:28:01 +0000 | [diff] [blame] | 40 | ~SSecurityVeNCrypt(); |
Pierre Ossman | ad2b3c4 | 2018-09-21 15:31:11 +0200 | [diff] [blame^] | 41 | virtual bool processMsg(); |
Pierre Ossman | 555815a | 2014-12-02 15:13:22 +0100 | [diff] [blame] | 42 | virtual int getType() const { return chosenType; } |
| 43 | virtual const char* getUserName() const; |
| 44 | virtual SConnection::AccessRights getAccessRights() const; |
Adam Tkac | 5522d61 | 2010-08-11 15:28:01 +0000 | [diff] [blame] | 45 | |
| 46 | protected: |
| 47 | SSecurity *ssecurity; |
Adam Tkac | bfd66c1 | 2010-10-01 08:33:29 +0000 | [diff] [blame] | 48 | SecurityServer *security; |
Adam Tkac | 5522d61 | 2010-08-11 15:28:01 +0000 | [diff] [blame] | 49 | bool haveSentVersion, haveRecvdMajorVersion, haveRecvdMinorVersion; |
| 50 | bool haveSentTypes, haveChosenType; |
| 51 | rdr::U8 majorVersion, minorVersion, numTypes; |
| 52 | rdr::U32 *subTypes, chosenType; |
| 53 | }; |
| 54 | } |
| 55 | #endif |