Make debug statement more portable
There's little reason for accessing the hash implementation's internal state, its output contains most of the same information. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
parent
a3b625b0a1
commit
0ac71c0d92
1 changed files with 4 additions and 9 deletions
|
@ -7675,17 +7675,14 @@ static int ssl_calc_finished_tls_sha256(
|
||||||
* Hash( handshake ) )[0.11]
|
* Hash( handshake ) )[0.11]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(MBEDTLS_SHA256_ALT)
|
|
||||||
MBEDTLS_SSL_DEBUG_BUF(4, "finished sha2 state", (unsigned char *)
|
|
||||||
sha256.state, sizeof(sha256.state));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ret = mbedtls_sha256_finish(&sha256, padbuf);
|
ret = mbedtls_sha256_finish(&sha256, padbuf);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||||
|
|
||||||
|
MBEDTLS_SSL_DEBUG_BUF(4, "finished sha256 output", padbuf, 32);
|
||||||
|
|
||||||
ssl->handshake->tls_prf(session->master, 48, sender,
|
ssl->handshake->tls_prf(session->master, 48, sender,
|
||||||
padbuf, 32, buf, len);
|
padbuf, 32, buf, len);
|
||||||
|
|
||||||
|
@ -7760,16 +7757,14 @@ static int ssl_calc_finished_tls_sha384(
|
||||||
* Hash( handshake ) )[0.11]
|
* Hash( handshake ) )[0.11]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(MBEDTLS_SHA512_ALT)
|
|
||||||
MBEDTLS_SSL_DEBUG_BUF(4, "finished sha512 state", (unsigned char *)
|
|
||||||
sha512.state, sizeof(sha512.state));
|
|
||||||
#endif
|
|
||||||
ret = mbedtls_sha512_finish(&sha512, padbuf);
|
ret = mbedtls_sha512_finish(&sha512, padbuf);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
MBEDTLS_SSL_DEBUG_BUF(4, "finished sha384 output", padbuf, 48);
|
||||||
|
|
||||||
ssl->handshake->tls_prf(session->master, 48, sender,
|
ssl->handshake->tls_prf(session->master, 48, sender,
|
||||||
padbuf, 48, buf, len);
|
padbuf, 48, buf, len);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue