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: 2025-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 14 #ifndef ZT_CREDENTIAL_HPP 15 #define ZT_CREDENTIAL_HPP 16 17 #include <string> 18 #include <memory> 19 #include <stdexcept> 20 21 #include <stdio.h> 22 #include <stdlib.h> 23 #include <stdint.h> 24 #include <string.h> 25 26 #include "Constants.hpp" 27 28 namespace ZeroTier { 29 30 /** 31 * Base class for credentials 32 */ 33 class Credential 34 { 35 public: 36 /** 37 * Do not change type code IDs -- these are used in Revocation objects and elsewhere 38 */ 39 enum Type 40 { 41 CREDENTIAL_TYPE_NULL = 0, 42 CREDENTIAL_TYPE_COM = 1, // CertificateOfMembership 43 CREDENTIAL_TYPE_CAPABILITY = 2, 44 CREDENTIAL_TYPE_TAG = 3, 45 CREDENTIAL_TYPE_COO = 4, // CertificateOfOwnership 46 CREDENTIAL_TYPE_REVOCATION = 6 47 }; 48 }; 49 50 } // namespace ZeroTier 51 52 #endif 53