ssl_tls: use PSA to compute running handshake hash for TLS 1.2
This commit is contained in:
parent
2192c27720
commit
eb342241a5
2 changed files with 168 additions and 17 deletions
|
@ -27,6 +27,10 @@
|
|||
#include "ssl.h"
|
||||
#include "cipher.h"
|
||||
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
#include "psa/crypto.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_MD5_C)
|
||||
#include "md5.h"
|
||||
#endif
|
||||
|
@ -370,11 +374,19 @@ struct mbedtls_ssl_handshake_params
|
|||
#endif
|
||||
#if defined(MBEDTLS_SSL_PROTO_TLS1_2)
|
||||
#if defined(MBEDTLS_SHA256_C)
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
psa_hash_operation_t fin_sha256_psa;
|
||||
#else
|
||||
mbedtls_sha256_context fin_sha256;
|
||||
#endif
|
||||
#endif
|
||||
#if defined(MBEDTLS_SHA512_C)
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
psa_hash_operation_t fin_sha512_psa;
|
||||
#else
|
||||
mbedtls_sha512_context fin_sha512;
|
||||
#endif
|
||||
#endif
|
||||
#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */
|
||||
|
||||
void (*update_checksum)(mbedtls_ssl_context *, const unsigned char *, size_t);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue