blob: e671df1167ce26d66326400de95e10ea49b0c090 [file] [log] [blame]
Steven Cooreman2a1664c2020-07-20 15:33:08 +02001/*
2 * Test driver for signature functions
3 */
4/* Copyright (C) 2020, ARM Limited, All Rights Reserved
5 * SPDX-License-Identifier: Apache-2.0
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License"); you may
8 * not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *
19 * This file is part of mbed TLS (https://tls.mbed.org)
20 */
21
Steven Cooremanf1720ea2020-07-24 18:41:58 +020022#ifndef PSA_CRYPTO_TEST_DRIVERS_KEYGEN_H
23#define PSA_CRYPTO_TEST_DRIVERS_KEYGEN_H
Steven Cooreman2a1664c2020-07-20 15:33:08 +020024
25#if !defined(MBEDTLS_CONFIG_FILE)
26#include "mbedtls/config.h"
27#else
28#include MBEDTLS_CONFIG_FILE
29#endif
30
Steven Cooremanf1720ea2020-07-24 18:41:58 +020031#if defined(PSA_CRYPTO_DRIVER_TEST)
Steven Cooreman2a1664c2020-07-20 15:33:08 +020032#include <psa/crypto_driver_common.h>
33
34extern void *test_driver_keygen_forced_output;
35extern size_t test_driver_keygen_forced_output_length;
36
37extern psa_status_t test_transparent_keygen_status;
38extern unsigned long test_transparent_keygen_hit;
39
40psa_status_t test_transparent_generate_key(
41 const psa_key_attributes_t *attributes,
42 uint8_t *key, size_t key_size, size_t *key_length );
43
44psa_status_t test_opaque_generate_key(
45 const psa_key_attributes_t *attributes,
46 uint8_t *key, size_t key_size, size_t *key_length );
47
Steven Cooremanf1720ea2020-07-24 18:41:58 +020048#endif /* PSA_CRYPTO_DRIVER_TEST */
49#endif /* PSA_CRYPTO_TEST_DRIVERS_KEYGEN_H */