mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-03 02:41:10 +00:00
Merge pull request #230 from AndrzejKurek/remove-double-underscore
Remove double underscores from macro and add a check for it
This commit is contained in:
commit
ecfd050633
|
@ -1015,15 +1015,15 @@
|
||||||
* \return The corresponding AEAD algorithm with the default
|
* \return The corresponding AEAD algorithm with the default
|
||||||
* tag length for that algorithm.
|
* tag length for that algorithm.
|
||||||
*/
|
*/
|
||||||
#define PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH(aead_alg) \
|
#define PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH(aead_alg) \
|
||||||
( \
|
( \
|
||||||
PSA__ALG_AEAD_WITH_DEFAULT_TAG_LENGTH__CASE(aead_alg, PSA_ALG_CCM) \
|
PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH_CASE(aead_alg, PSA_ALG_CCM) \
|
||||||
PSA__ALG_AEAD_WITH_DEFAULT_TAG_LENGTH__CASE(aead_alg, PSA_ALG_GCM) \
|
PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH_CASE(aead_alg, PSA_ALG_GCM) \
|
||||||
PSA__ALG_AEAD_WITH_DEFAULT_TAG_LENGTH__CASE(aead_alg, PSA_ALG_CHACHA20_POLY1305) \
|
PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH_CASE(aead_alg, PSA_ALG_CHACHA20_POLY1305) \
|
||||||
0)
|
0)
|
||||||
#define PSA__ALG_AEAD_WITH_DEFAULT_TAG_LENGTH__CASE(aead_alg, ref) \
|
#define PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH_CASE(aead_alg, ref) \
|
||||||
PSA_ALG_AEAD_WITH_TAG_LENGTH(aead_alg, 0) == \
|
PSA_ALG_AEAD_WITH_TAG_LENGTH(aead_alg, 0) == \
|
||||||
PSA_ALG_AEAD_WITH_TAG_LENGTH(ref, 0) ? \
|
PSA_ALG_AEAD_WITH_TAG_LENGTH(ref, 0) ? \
|
||||||
ref :
|
ref :
|
||||||
|
|
||||||
#define PSA_ALG_RSA_PKCS1V15_SIGN_BASE ((psa_algorithm_t)0x10020000)
|
#define PSA_ALG_RSA_PKCS1V15_SIGN_BASE ((psa_algorithm_t)0x10020000)
|
||||||
|
|
|
@ -57,11 +57,14 @@ for THING in actual-macros enum-consts; do
|
||||||
printf "Names of $THING: "
|
printf "Names of $THING: "
|
||||||
test -r $THING
|
test -r $THING
|
||||||
BAD=$( grep -E -v '^(MBEDTLS|PSA)_[0-9A-Z_]*[0-9A-Z]$' $THING || true )
|
BAD=$( grep -E -v '^(MBEDTLS|PSA)_[0-9A-Z_]*[0-9A-Z]$' $THING || true )
|
||||||
if [ "x$BAD" = "x" ]; then
|
UNDERSCORES=$( grep -E '.*__.*' $THING || true )
|
||||||
|
|
||||||
|
if [ "x$BAD" = "x" ] && [ "x$UNDERSCORES" = "x" ]; then
|
||||||
echo "PASS"
|
echo "PASS"
|
||||||
else
|
else
|
||||||
echo "FAIL"
|
echo "FAIL"
|
||||||
echo "$BAD"
|
echo "$BAD"
|
||||||
|
echo "$UNDERSCORES"
|
||||||
FAIL=1
|
FAIL=1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
@ -162,6 +162,7 @@ class Inputs:
|
||||||
# PSA_ALG_ECDH and PSA_ALG_FFDH are excluded for now as the script
|
# PSA_ALG_ECDH and PSA_ALG_FFDH are excluded for now as the script
|
||||||
# currently doesn't support them. Deprecated errors are also excluded.
|
# currently doesn't support them. Deprecated errors are also excluded.
|
||||||
_excluded_names = set(['PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH',
|
_excluded_names = set(['PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH',
|
||||||
|
'PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH_CASE',
|
||||||
'PSA_ALG_FULL_LENGTH_MAC',
|
'PSA_ALG_FULL_LENGTH_MAC',
|
||||||
'PSA_ALG_ECDH',
|
'PSA_ALG_ECDH',
|
||||||
'PSA_ALG_FFDH',
|
'PSA_ALG_FFDH',
|
||||||
|
|
Loading…
Reference in a new issue