Implemented Error Codes Enumeration for PTS
[strongswan.git] / src / libimcv / tcg / pts / pts_error.h
1 /*
2 * Copyright (C) 2011 Sansar Choinyambuu
3 * HSR Hochschule fuer Technik Rapperswil
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 */
15
16 /**
17 * @defgroup pts_error pts_error
18 * @{ @ingroup pts
19 */
20
21 #ifndef PTS_ERROR_H_
22 #define PTS_ERROR_H_
23
24 typedef enum pts_error_code_t pts_error_code_t;
25
26 #include <library.h>
27
28 /**
29 * PTS Attestation Error Codes
30 * see section 3.14.2 of PTS Protocol: Binding to TNC IF-M Specification
31 */
32 enum pts_error_code_t {
33 TCG_PTS_RESERVED_ERROR = 0,
34 TCG_PTS_HASH_ALG_NOT_SUPPORTED = 1,
35 TCG_PTS_INVALID_PATH = 2,
36 TCG_PTS_FILE_NOT_FOUND = 3,
37 TCG_PTS_REG_NOT_SUPPORTED = 4,
38 TCG_PTS_REG_KEY_NOT_FOUND = 5,
39 TCG_PTS_DH_GRPS_NOT_SUPPORTED = 6,
40 TCG_PTS_BAD_NONCE_LENGTH = 7,
41 TCG_PTS_INVALID_NAME_FAM = 8,
42 TCG_PTS_TPM_VERS_NOT_SUPPORTED = 9,
43 TCG_PTS_INVALID_DELIMITER = 10,
44 TCG_PTS_OPERATION_NOT_SUPPORTED = 11,
45 TCG_PTS_RM_ERROR = 12,
46 TCG_PTS_UNABLE_LOCAL_VAL = 13,
47 TCG_PTS_UNABLE_CUR_EVID = 14,
48 TCG_PTS_UNABLE_DET_TTC = 15,
49 TCG_PTS_UNABLE_DET_PCR = 16,
50 PB_BATCH_ROOF = 16
51 };
52
53 /**
54 * enum name for pts_error_code_t.
55 */
56 extern enum_name_t *pts_error_code_names;
57
58 #endif /** PTS_ERROR_H_ @}*/