mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Remove MBEDTLS_RSA_ALT
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
This commit is contained in:
@ -1,16 +0,0 @@
|
||||
/* rsa_alt.h with dummy types for MBEDTLS_RSA_ALT */
|
||||
/*
|
||||
* Copyright The Mbed TLS Contributors
|
||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#ifndef RSA_ALT_H
|
||||
#define RSA_ALT_H
|
||||
|
||||
typedef struct mbedtls_rsa_context {
|
||||
int dummy;
|
||||
}
|
||||
mbedtls_rsa_context;
|
||||
|
||||
|
||||
#endif /* rsa_alt.h */
|
@ -171,7 +171,7 @@ void mbedtls_ct_if(char *c_str, char *t_str, char *f_str)
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_PKCS1_V15:MBEDTLS_RSA_C:!MBEDTLS_RSA_ALT */
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_PKCS1_V15:MBEDTLS_RSA_C */
|
||||
void mbedtls_ct_zeroize_if(char *c_str, int len)
|
||||
{
|
||||
uint8_t *buf = NULL;
|
||||
@ -431,7 +431,7 @@ exit:
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_PKCS1_V15:MBEDTLS_RSA_C:!MBEDTLS_RSA_ALT */
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_PKCS1_V15:MBEDTLS_RSA_C */
|
||||
void mbedtls_ct_memmove_left(int len, int offset)
|
||||
{
|
||||
size_t l = (size_t) len;
|
||||
|
@ -235,7 +235,6 @@ void pkcs1_v15_decode(data_t *input,
|
||||
size_t i;
|
||||
size_t count = 0;
|
||||
|
||||
#if !defined(MBEDTLS_RSA_ALT)
|
||||
/* Check that the output in invalid cases is what the default
|
||||
* implementation currently does. Alternative implementations
|
||||
* may produce different output, so we only perform these precise
|
||||
@ -244,7 +243,7 @@ void pkcs1_v15_decode(data_t *input,
|
||||
for (i = 0; i < max_payload_length; i++) {
|
||||
TEST_ASSERT(final[i] == 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Even in alternative implementations, the outputs must have
|
||||
* changed, otherwise it indicates at least a timing vulnerability
|
||||
* because no write to the outputs is performed in the bad case. */
|
||||
|
Reference in New Issue
Block a user