mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-04-20 22:05:15 +00:00
Merge remote-tracking branch 'upstream/development' into psa-m-aead-merge
Also fiixed the following merge problems:
crypto_struct.h : Added MBEDTLS_PRIVATE to psa_aead_operation_s
members (merge conflict)
psa_crypto_aead.c : Added ciphertext_length to mbedtls_gcm_finish
call (change of API during development)
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
commit
71b0567c87
542 changed files with 27388 additions and 25216 deletions
|
|
@ -20,11 +20,7 @@
|
|||
#ifndef PSA_CRYPTO_TEST_DRIVERS_AEAD_H
|
||||
#define PSA_CRYPTO_TEST_DRIVERS_AEAD_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
#include "mbedtls/build_info.h"
|
||||
|
||||
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
||||
#include <psa/crypto_driver_common.h>
|
||||
|
|
|
|||
|
|
@ -20,11 +20,7 @@
|
|||
#ifndef PSA_CRYPTO_TEST_DRIVERS_CIPHER_H
|
||||
#define PSA_CRYPTO_TEST_DRIVERS_CIPHER_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
#include "mbedtls/build_info.h"
|
||||
|
||||
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
||||
#include <psa/crypto_driver_common.h>
|
||||
|
|
|
|||
|
|
@ -20,11 +20,7 @@
|
|||
#ifndef PSA_CRYPTO_TEST_DRIVERS_HASH_H
|
||||
#define PSA_CRYPTO_TEST_DRIVERS_HASH_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
#include "mbedtls/build_info.h"
|
||||
|
||||
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
||||
#include <psa/crypto_driver_common.h>
|
||||
|
|
|
|||
|
|
@ -20,11 +20,7 @@
|
|||
#ifndef PSA_CRYPTO_TEST_DRIVERS_KEY_MANAGEMENT_H
|
||||
#define PSA_CRYPTO_TEST_DRIVERS_KEY_MANAGEMENT_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
#include "mbedtls/build_info.h"
|
||||
|
||||
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
||||
#include <psa/crypto_driver_common.h>
|
||||
|
|
@ -53,6 +49,20 @@ static inline mbedtls_test_driver_key_management_hooks_t
|
|||
return( v );
|
||||
}
|
||||
|
||||
/*
|
||||
* In order to convert the plain text keys to Opaque, the size of the key is
|
||||
* padded up by PSA_CRYPTO_TEST_DRIVER_OPAQUE_PAD_PREFIX_SIZE in addition to
|
||||
* xor mangling the key. The pad prefix needs to be accounted for while
|
||||
* sizing for the key.
|
||||
*/
|
||||
#define PSA_CRYPTO_TEST_DRIVER_OPAQUE_PAD_PREFIX 0xBEEFED00U
|
||||
#define PSA_CRYPTO_TEST_DRIVER_OPAQUE_PAD_PREFIX_SIZE sizeof( \
|
||||
PSA_CRYPTO_TEST_DRIVER_OPAQUE_PAD_PREFIX )
|
||||
|
||||
size_t mbedtls_test_opaque_size_function(
|
||||
const psa_key_type_t key_type,
|
||||
const size_t key_bits );
|
||||
|
||||
extern mbedtls_test_driver_key_management_hooks_t
|
||||
mbedtls_test_driver_key_management_hooks;
|
||||
|
||||
|
|
@ -88,10 +98,28 @@ psa_status_t mbedtls_test_transparent_import_key(
|
|||
size_t *key_buffer_length,
|
||||
size_t *bits);
|
||||
|
||||
psa_status_t mbedtls_test_opaque_import_key(
|
||||
const psa_key_attributes_t *attributes,
|
||||
const uint8_t *data,
|
||||
size_t data_length,
|
||||
uint8_t *key_buffer,
|
||||
size_t key_buffer_size,
|
||||
size_t *key_buffer_length,
|
||||
size_t *bits);
|
||||
|
||||
psa_status_t mbedtls_test_opaque_get_builtin_key(
|
||||
psa_drv_slot_number_t slot_number,
|
||||
psa_key_attributes_t *attributes,
|
||||
uint8_t *key_buffer, size_t key_buffer_size, size_t *key_buffer_length );
|
||||
|
||||
psa_status_t mbedtls_test_opaque_copy_key(
|
||||
psa_key_attributes_t *attributes,
|
||||
const uint8_t *source_key,
|
||||
size_t source_key_length,
|
||||
uint8_t *target_key_buffer,
|
||||
size_t target_key_buffer_size,
|
||||
size_t *target_key_buffer_length);
|
||||
|
||||
|
||||
#endif /* PSA_CRYPTO_DRIVER_TEST */
|
||||
#endif /* PSA_CRYPTO_TEST_DRIVERS_KEY_MANAGEMENT_H */
|
||||
|
|
|
|||
|
|
@ -20,11 +20,7 @@
|
|||
#ifndef PSA_CRYPTO_TEST_DRIVERS_MAC_H
|
||||
#define PSA_CRYPTO_TEST_DRIVERS_MAC_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
#include "mbedtls/build_info.h"
|
||||
|
||||
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
||||
#include <psa/crypto_driver_common.h>
|
||||
|
|
|
|||
|
|
@ -20,11 +20,7 @@
|
|||
#ifndef PSA_CRYPTO_TEST_DRIVERS_SIGNATURE_H
|
||||
#define PSA_CRYPTO_TEST_DRIVERS_SIGNATURE_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
#include "mbedtls/build_info.h"
|
||||
|
||||
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
||||
#include <psa/crypto_driver_common.h>
|
||||
|
|
|
|||
|
|
@ -1,37 +0,0 @@
|
|||
/*
|
||||
* Test driver for context size functions
|
||||
*/
|
||||
/* Copyright The Mbed TLS Contributors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef PSA_CRYPTO_TEST_DRIVERS_SIZE_H
|
||||
#define PSA_CRYPTO_TEST_DRIVERS_SIZE_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
||||
#include <psa/crypto_driver_common.h>
|
||||
|
||||
size_t mbedtls_test_size_function(
|
||||
const psa_key_type_t key_type,
|
||||
const size_t key_bits );
|
||||
|
||||
#endif /* PSA_CRYPTO_DRIVER_TEST */
|
||||
#endif /* PSA_CRYPTO_TEST_DRIVERS_SIZE_H */
|
||||
|
|
@ -28,6 +28,5 @@
|
|||
#include "test/drivers/mac.h"
|
||||
#include "test/drivers/key_management.h"
|
||||
#include "test/drivers/signature.h"
|
||||
#include "test/drivers/size.h"
|
||||
|
||||
#endif /* PSA_CRYPTO_TEST_DRIVER_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue