123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- /*
- * Copyright (C) 2011-2016 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Intel Corporation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
- #ifndef _AE_ERROR_H_
- #define _AE_ERROR_H_
- typedef enum _ae_error_t{
- AE_SUCCESS = 0,
- AE_FAILURE = 1,
- AE_ENCLAVE_LOST = 2,
- OAL_PARAMETER_ERROR = 3,
- OAL_PATHNAME_BUFFER_OVERFLOW_ERROR = 4,
- OAL_FILE_ACCESS_ERROR = 5,
- OAL_CONFIG_FILE_ERROR = 6,
- OAL_NETWORK_UNAVAILABLE_ERROR = 7,
- OAL_NETWORK_BUSY = 8,
- OAL_NETWORK_RESEND_REQUIRED = 9,
- OAL_PROXY_SETTING_ASSIST = 10,
- OAL_THREAD_ERROR = 11,
- OAL_THREAD_TIMEOUT_ERROR = 12,
- AE_PSVN_UNMATCHED_ERROR = 13,
- AE_SERVER_NOT_AVAILABLE = 14,
- AE_INVALID_PARAMETER = 15,
- AE_READ_RAND_ERROR = 16,
- AE_OUT_OF_MEMORY_ERROR = 17,
- AE_INSUFFICIENT_DATA_IN_BUFFER = 18,
- /* QUOTING ENCLAVE ERROR CASES*/
- QE_UNEXPECTED_ERROR = 19,
- QE_PARAMETER_ERROR = 20,
- QE_EPIDBLOB_ERROR = 21,
- QE_REVOKED_ERROR = 22,
- QE_SIGRL_ERROR = 23,
- /* PROVISIONING ENCLAVE ERROR CASES*/
- PVE_UNEXPECTED_ERROR = 24,
- PVE_PARAMETER_ERROR = 25,
- PVE_EPIDBLOB_ERROR = 26,
- PVE_INSUFFICIENT_MEMORY_ERROR = 27,
- PVE_INTEGRITY_CHECK_ERROR = 28,
- PVE_SIGRL_INTEGRITY_CHECK_ERROR = 29,
- PVE_SERVER_REPORTED_ERROR = 30,
- PVE_PEK_SIGN_ERROR = 31,
- PVE_MSG_ERROR = 32,
- PVE_REVOKED_ERROR = 33,
- PVE_SESSION_OUT_OF_ORDER_ERROR = 34,
- PVE_SERVER_BUSY_ERROR = 35,
- PVE_PERFORMANCE_REKEY_NOT_SUPPORTED = 36,
- /* LICENSING ENCLAVE ERROR CASES*/
- LE_UNEXPECTED_ERROR = 37,
- LE_INVALID_PARAMETER = 38,
- LE_GET_LICENSE_KEY_ERROR = 39,
- LE_INVALID_ATTRIBUTE = 40,
- LE_INVALID_PRIVILEGE_ERROR = 41,
- LE_WHITELIST_UNINITIALIZED_ERROR = 42,
- LE_CALC_LIC_TOKEN_ERROR = 43,
- AESM_NLTP_NO_LTP_BLOB =178,
- AESM_NLTP_DONT_NEED_UPDATE_PAIR_LTP =179,
- AESM_NLTP_MAY_NEED_UPDATE_LTP =180,
- AESM_NLTP_OLD_EPID11_RLS =181,
- AESM_PCP_NEED_PSE_UPDATE =182,
- AESM_PCP_PSE_CERT_PROVISIONING_ATTESTATION_FAILURE_NEED_EPID_UPDATE =183,
- AESM_PCP_PSE_CERT_PROVISIONING_ATTESTATION_FAILURE_MIGHT_NEED_EPID_UPDATE =184,
- AESM_PCP_SIMPLE_PSE_CERT_PROVISIONING_ERROR =185,
- AESM_PCP_SIMPLE_EPID_PROVISION_ERROR =186,
- AESM_NPC_DONT_NEED_PSEP =187,
- AESM_NPC_NO_PSE_CERT =188,
- AESM_NPC_DONT_NEED_UPDATE_PSEP =189,
- AESM_NPC_MAY_NEED_UPDATE_PSEP =190,
- AESM_NEP_DONT_NEED_EPID_PROVISIONING =191,
- AESM_NEP_DONT_NEED_UPDATE_PVEQE =192,
- AESM_NEP_PERFORMANCE_REKEY =193,
- AESM_NEP_MAY_NEED_UPDATE =194,
- AESM_CP_ATTESTATION_FAILURE =195,
- AESM_LTP_PSE_CERT_REVOKED =196,
- AESM_LTP_SIMPLE_LTP_ERROR =197,
- AESM_PSE_PR_GET_PRIVRL_ERROR =198,
- AESM_NETWORK_TIMEOUT =199,
- AE_SERVICE_NOT_AVAILABLE =200,
- PSW_UPDATED_REQUIRED =201
- } ae_error_t;
- #define AE_FAILED(x) (AE_SUCCESS != (x))
- #define AE_SUCCEEDED(x) (AE_SUCCESS == (x))
- /* These definitions are usable to exit a loop*/
- #define BREAK_IF_TRUE(x, Sts, ErrCode) if (x) { Sts = ErrCode; break; }
- #define BREAK_IF_FALSE(x, Sts, ErrCode) if (!(x)) { Sts = ErrCode; break; }
- #define BREAK_IF_FAILED(x) if (AE_SUCCESS != (x)) { break; }
- #define BREAK_IF_FAILED_ERR(x, ErrCode) if (AE_SUCCESS != (x)) { x = ErrCode; break; }
- #endif/*_AE_ERROR_H_*/
|