mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-10-23 01:52:40 +03:00
Remove internal deprecated items
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
This commit is contained in:
@@ -775,11 +775,6 @@ struct mbedtls_ssl_handshake_params {
|
||||
uint16_t received_sig_algs[MBEDTLS_RECEIVED_SIG_ALGS_SIZE];
|
||||
#endif
|
||||
|
||||
#if !defined(MBEDTLS_DEPRECATED_REMOVED)
|
||||
const uint16_t *group_list;
|
||||
const uint16_t *sig_algs;
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_KEY_EXCHANGE_SOME_XXDH_PSA_ANY_ENABLED)
|
||||
psa_key_type_t xxdh_psa_type;
|
||||
size_t xxdh_psa_bits;
|
||||
@@ -2306,12 +2301,6 @@ static inline const void *mbedtls_ssl_get_sig_algs(
|
||||
{
|
||||
#if defined(MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED)
|
||||
|
||||
#if !defined(MBEDTLS_DEPRECATED_REMOVED)
|
||||
if (ssl->handshake != NULL &&
|
||||
ssl->handshake->sig_algs != NULL) {
|
||||
return ssl->handshake->sig_algs;
|
||||
}
|
||||
#endif
|
||||
return ssl->conf->sig_algs;
|
||||
|
||||
#else /* MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED */
|
||||
@@ -2576,37 +2565,6 @@ psa_status_t mbedtls_ssl_cipher_to_psa(mbedtls_cipher_type_t mbedtls_cipher_type
|
||||
psa_key_type_t *key_type,
|
||||
size_t *key_size);
|
||||
|
||||
#if !defined(MBEDTLS_DEPRECATED_REMOVED)
|
||||
/**
|
||||
* \brief Convert given PSA status to mbedtls error code.
|
||||
*
|
||||
* \param status [in] given PSA status
|
||||
*
|
||||
* \return corresponding mbedtls error code
|
||||
*/
|
||||
static inline MBEDTLS_DEPRECATED int psa_ssl_status_to_mbedtls(psa_status_t status)
|
||||
{
|
||||
switch (status) {
|
||||
case PSA_SUCCESS:
|
||||
return 0;
|
||||
case PSA_ERROR_INSUFFICIENT_MEMORY:
|
||||
return MBEDTLS_ERR_SSL_ALLOC_FAILED;
|
||||
case PSA_ERROR_NOT_SUPPORTED:
|
||||
return MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE;
|
||||
case PSA_ERROR_INVALID_SIGNATURE:
|
||||
return MBEDTLS_ERR_SSL_INVALID_MAC;
|
||||
case PSA_ERROR_INVALID_ARGUMENT:
|
||||
return MBEDTLS_ERR_SSL_BAD_INPUT_DATA;
|
||||
case PSA_ERROR_BAD_STATE:
|
||||
return MBEDTLS_ERR_SSL_INTERNAL_ERROR;
|
||||
case PSA_ERROR_BUFFER_TOO_SMALL:
|
||||
return MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL;
|
||||
default:
|
||||
return MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED;
|
||||
}
|
||||
}
|
||||
#endif /* !MBEDTLS_DEPRECATED_REMOVED */
|
||||
|
||||
#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
|
||||
|
||||
typedef enum {
|
||||
|
@@ -4368,9 +4368,6 @@ void mbedtls_ssl_handshake_free(mbedtls_ssl_context *ssl)
|
||||
}
|
||||
|
||||
#if defined(MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED)
|
||||
#if !defined(MBEDTLS_DEPRECATED_REMOVED)
|
||||
handshake->sig_algs = NULL;
|
||||
#endif /* MBEDTLS_DEPRECATED_REMOVED */
|
||||
#if defined(MBEDTLS_SSL_PROTO_TLS1_3)
|
||||
if (ssl->handshake->certificate_request_context) {
|
||||
mbedtls_free((void *) handshake->certificate_request_context);
|
||||
|
@@ -318,9 +318,6 @@ void x509_crt_check(char *subject_key_file, char *subject_pwd,
|
||||
unsigned char check_buf[5000];
|
||||
unsigned char *p, *end;
|
||||
unsigned char tag, sz;
|
||||
#if defined(MBEDTLS_TEST_DEPRECATED) && defined(MBEDTLS_BIGNUM_C)
|
||||
mbedtls_mpi serial_mpi;
|
||||
#endif
|
||||
int ret, before_tag, after_tag;
|
||||
size_t olen = 0, pem_len = 0, buf_index = 0;
|
||||
int der_len = -1;
|
||||
@@ -373,9 +370,6 @@ void x509_crt_check(char *subject_key_file, char *subject_pwd,
|
||||
}
|
||||
|
||||
memset(&rnd_info, 0x2a, sizeof(mbedtls_test_rnd_pseudo_info));
|
||||
#if defined(MBEDTLS_TEST_DEPRECATED) && defined(MBEDTLS_BIGNUM_C)
|
||||
mbedtls_mpi_init(&serial_mpi);
|
||||
#endif
|
||||
|
||||
mbedtls_pk_init(&subject_key);
|
||||
mbedtls_pk_init(&issuer_key);
|
||||
@@ -561,9 +555,6 @@ exit:
|
||||
mbedtls_pk_free(&issuer_key_alt);
|
||||
mbedtls_pk_free(&subject_key);
|
||||
mbedtls_pk_free(&issuer_key);
|
||||
#if defined(MBEDTLS_TEST_DEPRECATED) && defined(MBEDTLS_BIGNUM_C)
|
||||
mbedtls_mpi_free(&serial_mpi);
|
||||
#endif
|
||||
psa_destroy_key(key_id);
|
||||
MD_OR_USE_PSA_DONE();
|
||||
}
|
||||
@@ -575,11 +566,6 @@ void x509_set_serial_check()
|
||||
mbedtls_x509write_cert ctx;
|
||||
uint8_t invalid_serial[MBEDTLS_X509_RFC5280_MAX_SERIAL_LEN + 1];
|
||||
|
||||
#if defined(MBEDTLS_TEST_DEPRECATED) && defined(MBEDTLS_BIGNUM_C)
|
||||
mbedtls_mpi serial_mpi;
|
||||
mbedtls_mpi_init(&serial_mpi);
|
||||
#endif
|
||||
|
||||
USE_PSA_INIT();
|
||||
memset(invalid_serial, 0x01, sizeof(invalid_serial));
|
||||
|
||||
@@ -588,11 +574,7 @@ void x509_set_serial_check()
|
||||
MBEDTLS_ERR_X509_BAD_INPUT_DATA);
|
||||
|
||||
exit:
|
||||
#if defined(MBEDTLS_TEST_DEPRECATED) && defined(MBEDTLS_BIGNUM_C)
|
||||
mbedtls_mpi_free(&serial_mpi);
|
||||
#else
|
||||
;
|
||||
#endif
|
||||
USE_PSA_DONE();
|
||||
}
|
||||
/* END_CASE */
|
||||
|
Reference in New Issue
Block a user