Credential.hpp 786 B

12345678910111213141516171819202122232425262728293031323334
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at https://mozilla.org/MPL/2.0/.
  4. *
  5. * (c) ZeroTier, Inc.
  6. * https://www.zerotier.com/
  7. */
  8. #ifndef ZT_CREDENTIAL_HPP
  9. #define ZT_CREDENTIAL_HPP
  10. namespace ZeroTier {
  11. /**
  12. * Base class for credentials
  13. */
  14. class Credential {
  15. public:
  16. /**
  17. * Do not change type code IDs -- these are used in Revocation objects and elsewhere
  18. */
  19. enum Type {
  20. CREDENTIAL_TYPE_NULL = 0,
  21. CREDENTIAL_TYPE_COM = 1, // CertificateOfMembership
  22. CREDENTIAL_TYPE_CAPABILITY = 2,
  23. CREDENTIAL_TYPE_TAG = 3,
  24. CREDENTIAL_TYPE_COO = 4, // CertificateOfOwnership
  25. CREDENTIAL_TYPE_REVOCATION = 6
  26. };
  27. };
  28. } // namespace ZeroTier
  29. #endif