mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 03:32:46 +00:00
(mbedtls) Get rid of deprecated functions
This commit is contained in:
parent
35577ae15b
commit
5d9deb58c2
14
deps/mbedtls/aes.c
vendored
14
deps/mbedtls/aes.c
vendored
@ -482,13 +482,6 @@ int mbedtls_internal_aes_encrypt( mbedtls_aes_context *ctx,
|
||||
}
|
||||
#endif /* !MBEDTLS_AES_ENCRYPT_ALT */
|
||||
|
||||
void mbedtls_aes_encrypt( mbedtls_aes_context *ctx,
|
||||
const unsigned char input[16],
|
||||
unsigned char output[16] )
|
||||
{
|
||||
mbedtls_internal_aes_encrypt( ctx, input, output );
|
||||
}
|
||||
|
||||
/*
|
||||
* AES-ECB block decryption
|
||||
*/
|
||||
@ -548,13 +541,6 @@ int mbedtls_internal_aes_decrypt( mbedtls_aes_context *ctx,
|
||||
}
|
||||
#endif /* !MBEDTLS_AES_DECRYPT_ALT */
|
||||
|
||||
void mbedtls_aes_decrypt( mbedtls_aes_context *ctx,
|
||||
const unsigned char input[16],
|
||||
unsigned char output[16] )
|
||||
{
|
||||
mbedtls_internal_aes_decrypt( ctx, input, output );
|
||||
}
|
||||
|
||||
/*
|
||||
* AES-ECB block encryption/decryption
|
||||
*/
|
||||
|
11
deps/mbedtls/ecdsa.c
vendored
11
deps/mbedtls/ecdsa.c
vendored
@ -339,17 +339,6 @@ cleanup:
|
||||
return( ret );
|
||||
}
|
||||
|
||||
#if defined(MBEDTLS_ECDSA_DETERMINISTIC)
|
||||
int mbedtls_ecdsa_write_signature_det( mbedtls_ecdsa_context *ctx,
|
||||
const unsigned char *hash, size_t hlen,
|
||||
unsigned char *sig, size_t *slen,
|
||||
mbedtls_md_type_t md_alg )
|
||||
{
|
||||
return( mbedtls_ecdsa_write_signature( ctx, md_alg, hash, hlen, sig, slen,
|
||||
NULL, NULL ) );
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Read and check signature
|
||||
*/
|
||||
|
31
deps/mbedtls/mbedtls/aes.h
vendored
31
deps/mbedtls/mbedtls/aes.h
vendored
@ -279,37 +279,6 @@ int mbedtls_internal_aes_decrypt( mbedtls_aes_context *ctx,
|
||||
const unsigned char input[16],
|
||||
unsigned char output[16] );
|
||||
|
||||
#define MBEDTLS_DEPRECATED
|
||||
/**
|
||||
* \brief Deprecated internal AES block encryption function
|
||||
* without return value.
|
||||
*
|
||||
* \deprecated Superseded by mbedtls_aes_encrypt_ext() in 2.5.0
|
||||
*
|
||||
* \param ctx AES context
|
||||
* \param input Plaintext block
|
||||
* \param output Output (ciphertext) block
|
||||
*/
|
||||
MBEDTLS_DEPRECATED void mbedtls_aes_encrypt( mbedtls_aes_context *ctx,
|
||||
const unsigned char input[16],
|
||||
unsigned char output[16] );
|
||||
|
||||
/**
|
||||
* \brief Deprecated internal AES block decryption function
|
||||
* without return value.
|
||||
*
|
||||
* \deprecated Superseded by mbedtls_aes_decrypt_ext() in 2.5.0
|
||||
*
|
||||
* \param ctx AES context
|
||||
* \param input Ciphertext block
|
||||
* \param output Output (plaintext) block
|
||||
*/
|
||||
MBEDTLS_DEPRECATED void mbedtls_aes_decrypt( mbedtls_aes_context *ctx,
|
||||
const unsigned char input[16],
|
||||
unsigned char output[16] );
|
||||
|
||||
#undef MBEDTLS_DEPRECATED
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
36
deps/mbedtls/mbedtls/ecdsa.h
vendored
36
deps/mbedtls/mbedtls/ecdsa.h
vendored
@ -162,42 +162,6 @@ int mbedtls_ecdsa_write_signature( mbedtls_ecdsa_context *ctx, mbedtls_md_type_t
|
||||
int (*f_rng)(void *, unsigned char *, size_t),
|
||||
void *p_rng );
|
||||
|
||||
#if defined(MBEDTLS_ECDSA_DETERMINISTIC)
|
||||
#define MBEDTLS_DEPRECATED
|
||||
/**
|
||||
* \brief Compute ECDSA signature and write it to buffer,
|
||||
* serialized as defined in RFC 4492 page 20.
|
||||
* Deterministic version, RFC 6979.
|
||||
* (Not thread-safe to use same context in multiple threads)
|
||||
*
|
||||
* \deprecated Superseded by mbedtls_ecdsa_write_signature() in 2.0.0
|
||||
*
|
||||
* \param ctx ECDSA context
|
||||
* \param hash Message hash
|
||||
* \param hlen Length of hash
|
||||
* \param sig Buffer that will hold the signature
|
||||
* \param slen Length of the signature written
|
||||
* \param md_alg MD algorithm used to hash the message
|
||||
*
|
||||
* \note The "sig" buffer must be at least as large as twice the
|
||||
* size of the curve used, plus 9 (eg. 73 bytes if a 256-bit
|
||||
* curve is used). MBEDTLS_ECDSA_MAX_LEN is always safe.
|
||||
*
|
||||
* \note If the bitlength of the message hash is larger than the
|
||||
* bitlength of the group order, then the hash is truncated as
|
||||
* prescribed by SEC1 4.1.3 step 5.
|
||||
*
|
||||
* \return 0 if successful,
|
||||
* or a MBEDTLS_ERR_ECP_XXX, MBEDTLS_ERR_MPI_XXX or
|
||||
* MBEDTLS_ERR_ASN1_XXX error code
|
||||
*/
|
||||
int mbedtls_ecdsa_write_signature_det( mbedtls_ecdsa_context *ctx,
|
||||
const unsigned char *hash, size_t hlen,
|
||||
unsigned char *sig, size_t *slen,
|
||||
mbedtls_md_type_t md_alg ) MBEDTLS_DEPRECATED;
|
||||
#undef MBEDTLS_DEPRECATED
|
||||
#endif /* MBEDTLS_ECDSA_DETERMINISTIC */
|
||||
|
||||
/**
|
||||
* \brief Read and verify an ECDSA signature
|
||||
*
|
||||
|
18
deps/mbedtls/mbedtls/md.h
vendored
18
deps/mbedtls/mbedtls/md.h
vendored
@ -118,24 +118,6 @@ void mbedtls_md_init( mbedtls_md_context_t *ctx );
|
||||
*/
|
||||
void mbedtls_md_free( mbedtls_md_context_t *ctx );
|
||||
|
||||
#define MBEDTLS_DEPRECATED
|
||||
/**
|
||||
* \brief Select MD to use and allocate internal structures.
|
||||
* Should be called after mbedtls_md_init() or mbedtls_md_free().
|
||||
* Makes it necessary to call mbedtls_md_free() later.
|
||||
*
|
||||
* \deprecated Superseded by mbedtls_md_setup() in 2.0.0
|
||||
*
|
||||
* \param ctx Context to set up.
|
||||
* \param md_info Message digest to use.
|
||||
*
|
||||
* \returns \c 0 on success,
|
||||
* \c MBEDTLS_ERR_MD_BAD_INPUT_DATA on parameter failure,
|
||||
* \c MBEDTLS_ERR_MD_ALLOC_FAILED memory allocation failure.
|
||||
*/
|
||||
int mbedtls_md_init_ctx( mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_info ) MBEDTLS_DEPRECATED;
|
||||
#undef MBEDTLS_DEPRECATED
|
||||
|
||||
/**
|
||||
* \brief Select MD to use and allocate internal structures.
|
||||
* Should be called after mbedtls_md_init() or mbedtls_md_free().
|
||||
|
5
deps/mbedtls/md.c
vendored
5
deps/mbedtls/md.c
vendored
@ -185,11 +185,6 @@ int mbedtls_md_clone( mbedtls_md_context_t *dst,
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
int mbedtls_md_init_ctx( mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_info )
|
||||
{
|
||||
return mbedtls_md_setup( ctx, md_info, 1 );
|
||||
}
|
||||
|
||||
int mbedtls_md_setup( mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_info, int hmac )
|
||||
{
|
||||
if( md_info == NULL || ctx == NULL )
|
||||
|
Loading…
x
Reference in New Issue
Block a user