-
Notifications
You must be signed in to change notification settings - Fork 14
/
spdm_responder_conformance_test_lib.h
131 lines (114 loc) · 7.84 KB
/
spdm_responder_conformance_test_lib.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/**
* Copyright Notice:
* Copyright 2021 DMTF, Componolit. All rights reserved.
* License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/libspdm/blob/main/LICENSE.md
**/
#ifndef __SPDM_RESPONDER_CONFORMANCE_TEST_LIB_H__
#define __SPDM_RESPONDER_CONFORMANCE_TEST_LIB_H__
#include "library/spdm_common_lib.h"
#include "library/common_test_utility_lib.h"
void spdm_responder_conformance_test (void *spdm_context,
const common_test_suite_config_t *test_config);
/* below definition should be aligned with test case description in doc dir */
#define SPDM_RESPONDER_TEST_GROUP_VERSION 1
#define SPDM_RESPONDER_TEST_CASE_VERSION_SUCCESS_10 1
#define SPDM_RESPONDER_TEST_GROUP_CAPABILITIES 2
#define SPDM_RESPONDER_TEST_CASE_CAPABILITIES_SUCCESS_10 1
#define SPDM_RESPONDER_TEST_CASE_CAPABILITIES_VERSION_MISMATCH 2
#define SPDM_RESPONDER_TEST_CASE_CAPABILITIES_SUCCESS_11 3
#define SPDM_RESPONDER_TEST_CASE_CAPABILITIES_INVALID_REQUEST 4
#define SPDM_RESPONDER_TEST_CASE_CAPABILITIES_SUCCESS_12 5
#define SPDM_RESPONDER_TEST_CASE_CAPABILITIES_UNEXPECTED_REQUEST_NON_IDENTICAL 6
#define SPDM_RESPONDER_TEST_GROUP_ALGORITHMS 3
#define SPDM_RESPONDER_TEST_CASE_ALGORITHMS_SUCCESS_10 1
#define SPDM_RESPONDER_TEST_CASE_ALGORITHMS_VERSION_MISMATCH 2
#define SPDM_RESPONDER_TEST_CASE_ALGORITHMS_UNEXPECTED_REQUEST 3
#define SPDM_RESPONDER_TEST_CASE_ALGORITHMS_INVALID_REQUEST 4
#define SPDM_RESPONDER_TEST_CASE_ALGORITHMS_SUCCESS_11 5
#define SPDM_RESPONDER_TEST_CASE_ALGORITHMS_SUCCESS_12 6
#define SPDM_RESPONDER_TEST_CASE_ALGORITHMS_UNEXPECTED_REQUEST_NON_IDENTICAL 7
#define SPDM_RESPONDER_TEST_GROUP_DIGESTS 4
#define SPDM_RESPONDER_TEST_CASE_DIGESTS_SUCCESS_10 1
#define SPDM_RESPONDER_TEST_CASE_DIGESTS_VERSION_MISMATCH 2
#define SPDM_RESPONDER_TEST_CASE_DIGESTS_UNEXPECTED_REQUEST 3
#define SPDM_RESPONDER_TEST_GROUP_CERTIFICATE 5
#define SPDM_RESPONDER_TEST_CASE_CERTIFICATE_SUCCESS_10 1
#define SPDM_RESPONDER_TEST_CASE_CERTIFICATE_VERSION_MISMATCH 2
#define SPDM_RESPONDER_TEST_CASE_CERTIFICATE_UNEXPECTED_REQUEST 3
#define SPDM_RESPONDER_TEST_CASE_CERTIFICATE_INVALID_REQUEST 4
#define SPDM_RESPONDER_TEST_CASE_CERTIFICATE_SPDM_X509_CERTIFICATE 5
#define SPDM_RESPONDER_TEST_GROUP_CHALLENGE_AUTH 6
#define SPDM_RESPONDER_TEST_CASE_CHALLENGE_AUTH_SUCCESS_10_A1B1C1 1
#define SPDM_RESPONDER_TEST_CASE_CHALLENGE_AUTH_SUCCESS_10_A1B2C1 2
#define SPDM_RESPONDER_TEST_CASE_CHALLENGE_AUTH_SUCCESS_10_A1B3C1 3
#define SPDM_RESPONDER_TEST_CASE_CHALLENGE_AUTH_VERSION_MISMATCH 4
#define SPDM_RESPONDER_TEST_CASE_CHALLENGE_AUTH_UNEXPECTED_REQUEST 5
#define SPDM_RESPONDER_TEST_CASE_CHALLENGE_AUTH_INVALID_REQUEST 6
#define SPDM_RESPONDER_TEST_CASE_CHALLENGE_AUTH_SUCCESS_12_A1B1C1 11
#define SPDM_RESPONDER_TEST_CASE_CHALLENGE_AUTH_SUCCESS_12_A1B2C1 12
#define SPDM_RESPONDER_TEST_CASE_CHALLENGE_AUTH_SUCCESS_12_A1B3C1 13
#define SPDM_RESPONDER_TEST_CASE_CHALLENGE_AUTH_SUCCESS_12_A1B4C1 14
#define SPDM_RESPONDER_TEST_CASE_CHALLENGE_AUTH_SUCCESS_12_A2B1C1 15
#define SPDM_RESPONDER_TEST_CASE_CHALLENGE_AUTH_SUCCESS_12_A2B2C1 16
#define SPDM_RESPONDER_TEST_CASE_CHALLENGE_AUTH_SUCCESS_12_A2B3C1 17
#define SPDM_RESPONDER_TEST_CASE_CHALLENGE_AUTH_SUCCESS_12_A2B4C1 18
#define SPDM_RESPONDER_TEST_GROUP_MEASUREMENTS 7
#define SPDM_RESPONDER_TEST_CASE_MEASUREMENTS_SUCCESS_10 1
#define SPDM_RESPONDER_TEST_CASE_MEASUREMENTS_VERSION_MISMATCH 2
#define SPDM_RESPONDER_TEST_CASE_MEASUREMENTS_UNEXPECTED_REQUEST 3
#define SPDM_RESPONDER_TEST_CASE_MEASUREMENTS_INVALID_REQUEST 4
#define SPDM_RESPONDER_TEST_CASE_MEASUREMENTS_SPDM_MEASUREMENT_BLOCK 5
#define SPDM_RESPONDER_TEST_CASE_MEASUREMENTS_SUCCESS_11 6
#define SPDM_RESPONDER_TEST_CASE_MEASUREMENTS_SUCCESS_11_IN_DHE_SESSION 7
#define SPDM_RESPONDER_TEST_CASE_MEASUREMENTS_UNEXPECTED_REQUEST_IN_DHE_SESSION_HS 8
#define SPDM_RESPONDER_TEST_CASE_MEASUREMENTS_SUCCESS_12 9
#define SPDM_RESPONDER_TEST_CASE_MEASUREMENTS_SUCCESS_12_IN_DHE_SESSION 10
#define SPDM_RESPONDER_TEST_GROUP_KEY_EXCHANGE_RSP 8
#define SPDM_RESPONDER_TEST_CASE_KEY_EXCHANGE_RSP_SUCCESS_11 1
#define SPDM_RESPONDER_TEST_CASE_KEY_EXCHANGE_RSP_SUCCESS_11_HS_CLEAR 2
#define SPDM_RESPONDER_TEST_CASE_KEY_EXCHANGE_RSP_VERSION_MISMATCH 3
#define SPDM_RESPONDER_TEST_CASE_KEY_EXCHANGE_RSP_UNEXPECTED_REQUEST 4
#define SPDM_RESPONDER_TEST_CASE_KEY_EXCHANGE_RSP_UNEXPECTED_REQUEST_IN_SESSION 5
#define SPDM_RESPONDER_TEST_CASE_KEY_EXCHANGE_RSP_INVALID_REQUEST 6
#define SPDM_RESPONDER_TEST_CASE_KEY_EXCHANGE_RSP_SUCCESS_12 7
#define SPDM_RESPONDER_TEST_CASE_KEY_EXCHANGE_RSP_SUCCESS_12_HS_CLEAR 8
#define SPDM_RESPONDER_TEST_GROUP_FINISH_RSP 9
#define SPDM_RESPONDER_TEST_CASE_FINISH_RSP_SUCCESS_11 \
1
#define SPDM_RESPONDER_TEST_CASE_FINISH_RSP_SUCCESS_11_HS_CLEAR \
2
#define SPDM_RESPONDER_TEST_CASE_FINISH_RSP_VERSION_MISMATCH \
3
#define SPDM_RESPONDER_TEST_CASE_FINISH_RSP_UNEXPECTED_REQUEST \
4
#define SPDM_RESPONDER_TEST_CASE_FINISH_RSP_UNEXPECTED_REQUEST_IN_SESSION \
5
#define SPDM_RESPONDER_TEST_CASE_FINISH_RSP_INVALID_REQUEST \
6
#define SPDM_RESPONDER_TEST_CASE_FINISH_RSP_DECRYPT_ERROR_INVALID_VERIFY_DATA \
7
#define SPDM_RESPONDER_TEST_CASE_FINISH_RSP_DECRYPT_ERROR_INVALID_VERIFY_DATA_HS_CLEAR \
8
#define SPDM_RESPONDER_TEST_CASE_FINISH_RSP_SUCCESS_12 \
9
#define SPDM_RESPONDER_TEST_CASE_FINISH_RSP_SUCCESS_12_HS_CLEAR \
10
#define SPDM_RESPONDER_TEST_CASE_FINISH_RSP_SESSION_REQUIRED \
11
#define SPDM_RESPONDER_TEST_GROUP_HEARTBEAT_ACK 12
#define SPDM_RESPONDER_TEST_CASE_HEARTBEAT_ACK_SUCCESS_11_IN_DHE_SESSION 1
#define SPDM_RESPONDER_TEST_CASE_HEARTBEAT_ACK_VERSION_MISMATCH_IN_DHE_SESSION 2
#define SPDM_RESPONDER_TEST_CASE_HEARTBEAT_ACK_UNEXPECTED_REQUEST_IN_DHE_SESSION_HS 3
#define SPDM_RESPONDER_TEST_CASE_HEARTBEAT_ACK_SESSION_REQUIRED 4
#define SPDM_RESPONDER_TEST_GROUP_KEY_UPDATE_ACK 13
#define SPDM_RESPONDER_TEST_CASE_KEY_UPDATE_ACK_SUCCESS_11_IN_DHE_SESSION 1
#define SPDM_RESPONDER_TEST_CASE_KEY_UPDATE_ACK_VERSION_MISMATCH_IN_DHE_SESSION 2
#define SPDM_RESPONDER_TEST_CASE_KEY_UPDATE_ACK_INVALID_REQUEST_IN_DHE_SESSION 3
#define SPDM_RESPONDER_TEST_CASE_KEY_UPDATE_ACK_UNEXPECTED_REQUEST_IN_DHE_SESSION_HS 4
#define SPDM_RESPONDER_TEST_CASE_KEY_UPDATE_ACK_SESSION_REQUIRED 5
#define SPDM_RESPONDER_TEST_GROUP_END_SESSION_ACK 16
#define SPDM_RESPONDER_TEST_CASE_END_SESSION_ACK_SUCCESS_11_IN_DHE_SESSION 1
#define SPDM_RESPONDER_TEST_CASE_END_SESSION_ACK_VERSION_MISMATCH_IN_DHE_SESSION 2
#define SPDM_RESPONDER_TEST_CASE_END_SESSION_ACK_UNEXPECTED_REQUEST_IN_DHE_SESSION_HS 3
#define SPDM_RESPONDER_TEST_CASE_END_SESSION_ACK_SESSION_REQUIRED 4
#endif