1 /* 2 * t_cose_make_test_pub_key.h 3 * 4 * Copyright 2019-2020, Laurence Lundblade 5 * 6 * SPDX-License-Identifier: BSD-3-Clause 7 * 8 * See BSD-3-Clause license in README.md 9 */ 10 11 #include "t_cose_common.h" 12 #include <stdint.h> 13 14 /** 15 * \file t_cose_make_test_pub_key.h 16 * 17 * \brief This defines a simple interface to make keys for tests cases. 18 * 19 */ 20 21 22 /** 23 * \brief make an ECDSA key pair for testing suited to algorim 24 * 25 */ 26 enum t_cose_err_t make_ecdsa_key_pair(int32_t cose_algorithm_id, 27 struct t_cose_key *key_pair); 28 29 30 void free_ecdsa_key_pair(struct t_cose_key key_pair); 31 32 33 /** 34 \brief Called by test frame work to see if there were key pair or mem leaks. 35 36 \return 0 if no leaks, non-zero if there is a leak. 37 */ 38 int check_for_key_pair_leaks(void); 39 40 41 42