Credential.hpp 896 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (c)2019 ZeroTier, Inc.
  3. *
  4. * Use of this software is governed by the Business Source License included
  5. * in the LICENSE.TXT file in the project's root directory.
  6. *
  7. * Change Date: 2026-01-01
  8. *
  9. * On the date above, in accordance with the Business Source License, use
  10. * of this software will be governed by version 2.0 of the Apache License.
  11. */
  12. /****/
  13. #ifndef ZT_CREDENTIAL_HPP
  14. #define ZT_CREDENTIAL_HPP
  15. namespace ZeroTier {
  16. /**
  17. * Base class for credentials
  18. */
  19. class Credential {
  20. public:
  21. /**
  22. * Do not change type code IDs -- these are used in Revocation objects and elsewhere
  23. */
  24. enum Type {
  25. CREDENTIAL_TYPE_NULL = 0,
  26. CREDENTIAL_TYPE_COM = 1, // CertificateOfMembership
  27. CREDENTIAL_TYPE_CAPABILITY = 2,
  28. CREDENTIAL_TYPE_TAG = 3,
  29. CREDENTIAL_TYPE_COO = 4, // CertificateOfOwnership
  30. CREDENTIAL_TYPE_REVOCATION = 6
  31. };
  32. };
  33. } // namespace ZeroTier
  34. #endif