blob: 05f8a986a04a5b9270de4b5d77e943805c92227b [file] [log] [blame]
John Durkop2c618352020-09-22 06:54:01 -07001/*
2 * Test driver for retrieving key context size.
3 * Only used by opaque drivers.
4 */
5/* Copyright The Mbed TLS Contributors
6 * SPDX-License-Identifier: Apache-2.0
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License"); you may
9 * not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20
21#if !defined(MBEDTLS_CONFIG_FILE)
22#include "mbedtls/config.h"
23#else
24#include MBEDTLS_CONFIG_FILE
25#endif
26
27#if defined(MBEDTLS_PSA_CRYPTO_DRIVERS) && defined(PSA_CRYPTO_DRIVER_TEST)
28#include "psa/crypto.h"
29#include "psa_crypto_core.h"
30#include "mbedtls/error.h"
31
32#include "test/drivers/size.h"
33
34#include <string.h>
35
36#ifdef TEST_KEY_CONTEXT_SIZE_FUNCTION
37size_t test_size_function(
38 const psa_key_type_t key_type,
39 const size_t key_bits )
40{
41 (void) key_type;
42 (void) key_bits;
43 return 0;
44}
45#endif /*TEST_KEY_CONTEXT_SIZE_FUNCTION */
46
47#endif /* MBEDTLS_PSA_CRYPTO_DRIVERS && PSA_CRYPTO_DRIVER_TEST */