You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CSecurityVeNCrypt.h 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. // CSecurityVeNCrypt
  23. //
  24. #ifndef __CSECURITYVENCRYPT_H__
  25. #define __CSECURITYVENCRYPT_H__
  26. #include <rfb/CSecurity.h>
  27. #include <rfb/SecurityClient.h>
  28. #include <rdr/types.h>
  29. namespace rfb {
  30. class CSecurityVeNCrypt : public CSecurity {
  31. public:
  32. CSecurityVeNCrypt(SecurityClient* sec);
  33. ~CSecurityVeNCrypt();
  34. virtual bool processMsg(CConnection* cc);// { return true; }
  35. int getType() const {return chosenType;}
  36. virtual const char* description() const { return secTypeName(chosenType); }
  37. virtual bool isSecure() const;
  38. protected:
  39. CSecurity *csecurity;
  40. SecurityClient *security;
  41. bool haveRecvdMajorVersion;
  42. bool haveRecvdMinorVersion;
  43. bool haveSentVersion;
  44. bool haveAgreedVersion;
  45. bool haveListOfTypes;
  46. bool haveNumberOfTypes;
  47. bool haveChosenType;
  48. rdr::U8 majorVersion, minorVersion;
  49. rdr::U32 chosenType;
  50. rdr::U8 nAvailableTypes;
  51. rdr::U32 *availableTypes;
  52. rdr::U8 iAvailableType;
  53. };
  54. }
  55. #endif