@@ -89,18 +89,28 @@ typedef MBEDTLS_PSA_DEPRECATED psa_dh_group_t mbedtls_deprecated_psa_dh_group_t;
8989/*
9090 * Deprecated PSA Crypto function names (PSA Crypto API <= 1.0 beta3)
9191 */
92- /* Make these macros and not wrappers so that there is no cost to
93- * applications that don't use the deprecated names.
94- *
95- * Put backslash-newline after "#define" to bypass check-names.sh which
96- * would otherwise complain about lowercase macro names.
97- */
98- #define \
99- psa_asymmetric_sign ( key , alg , hash , hash_length , signature , signature_size , signature_length ) \
100- ( (mbedtls_deprecated_psa_status_t) psa_sign_hash( key, alg, hash, hash_length, signature, signature_size, signature_length ) )
101- #define \
102- psa_asymmetric_verify ( key , alg , hash , hash_length , signature , signature_length ) \
103- ( (mbedtls_deprecated_psa_status_t) psa_verify_hash( key, alg, hash, hash_length, signature, signature_length ) )
92+ MBEDTLS_PSA_DEPRECATED static inline psa_status_t psa_asymmetric_sign ( psa_key_handle_t key ,
93+ psa_algorithm_t alg ,
94+ const uint8_t * hash ,
95+ size_t hash_length ,
96+ uint8_t * signature ,
97+ size_t signature_size ,
98+ size_t * signature_length )
99+ {
100+ return psa_sign_hash ( key , alg , hash , hash_length , signature , signature_size , signature_length );
101+ }
102+
103+ MBEDTLS_PSA_DEPRECATED static inline psa_status_t psa_asymmetric_verify ( psa_key_handle_t key ,
104+ psa_algorithm_t alg ,
105+ const uint8_t * hash ,
106+ size_t hash_length ,
107+ const uint8_t * signature ,
108+ size_t signature_length )
109+ {
110+ return psa_verify_hash ( key , alg , hash , hash_length , signature , signature_length );
111+ }
112+
113+
104114
105115#endif /* MBEDTLS_DEPRECATED_REMOVED */
106116
0 commit comments