mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-29 21:54:15 +01:00
Updates to cleanup fixes for #3294
Minor updates to changelog for more concise wording and fixed styling in other files as needed. Signed-off-by: John Durkop <john.durkop@fermatsoftware.com>
This commit is contained in:
parent
c14be901eb
commit
af5363c24e
@ -1,8 +1,4 @@
|
||||
Bugfix
|
||||
* Add guards in pk_wrap.c to ensure if ECDSA is not defined, errors are
|
||||
returned. Remove warnings in pk.c for unused variables. Add new test
|
||||
(test_depends_pkalgs_psa) to all.sh to confirm when USE_PSA_CRYPTO
|
||||
is defined that features are working properly. Fixes issue reported in
|
||||
#3294 where undefined reference errors occur when using USE_PSA_CRYPTO
|
||||
and removing ECDSA support.
|
||||
* Fix build failure in configurations where MBEDTLS_USE_PSA_CRYPTO is
|
||||
enabled but ECDSA is disabled. Contributed by jdurkop. Fixes #3294.
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "mbedtls/ecp.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_ECDSA_C) || defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
#if defined(MBEDTLS_ECDSA_C)
|
||||
#include "mbedtls/ecdsa.h"
|
||||
#endif
|
||||
|
||||
@ -1012,8 +1012,8 @@ static int pk_opaque_sign_wrap( void *ctx, mbedtls_md_type_t md_alg,
|
||||
((void) sig_len);
|
||||
((void) f_rng);
|
||||
((void) p_rng);
|
||||
return( PSA_ERROR_NOT_SUPPORTED );
|
||||
#else
|
||||
return( MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE );
|
||||
#else /* !MBEDTLS_ECDSA_C */
|
||||
const psa_key_handle_t *key = (const psa_key_handle_t *) ctx;
|
||||
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
|
||||
psa_algorithm_t alg = PSA_ALG_ECDSA( mbedtls_psa_translate_md( md_alg ) );
|
||||
@ -1044,7 +1044,7 @@ static int pk_opaque_sign_wrap( void *ctx, mbedtls_md_type_t md_alg,
|
||||
|
||||
/* transcode it to ASN.1 sequence */
|
||||
return( pk_ecdsa_sig_asn1_from_psa( sig, sig_len, buf_len ) );
|
||||
#endif
|
||||
#endif /* !MBEDTLS_ECDSA_C */
|
||||
}
|
||||
|
||||
const mbedtls_pk_info_t mbedtls_pk_opaque_info = {
|
||||
|
Loading…
Reference in New Issue
Block a user