1 /*
2    Copyright (c) 2021 Fraunhofer AISEC. See the COPYRIGHT
3    file at the top-level directory of this distribution.
4 
5    Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6    http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7    <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8    option. This file may not be copied, modified, or distributed
9    except according to those terms.
10 */
11 #ifndef EDHOC_TESTS_H
12 #define EDHOC_TESTS_H
13 
14 #include <stdint.h>
15 //#include "../../samples/common/test_vec_parser.h"
16 
17 struct messages {
18 	uint8_t *m1;
19 	uint32_t m1_len;
20 	uint8_t *m2;
21 	uint32_t m2_len;
22 	uint8_t *m3;
23 	uint32_t m3_len;
24 	uint8_t *m4;
25 	uint32_t m4_len;
26 };
27 
28 //extern struct messages_bufs m_bufs;
29 extern struct messages m;
30 
31 enum role { INITIATOR, RESPONDER };
32 
33 /**
34  * @brief       Runs an initiator/responder and compares the results with the  *              official test vectors.
35  * @param       p is INITIATOR or RESPONDER
36  * @param       vec_num the test vector number
37  */
38 int test_edhoc(enum role p, uint8_t vec_num);
39 
40 #endif