diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2022-12-29 11:19:28 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2022-12-29 11:19:28 +0300 |
commit | fed8d432668e1993b6d0d429398d65aa40f3f5fe (patch) | |
tree | 5b837c62d01f3fcdafb6a31ae4914f530053c5b9 /contrib/restricted/aws/s2n/tls/s2n_client_finished.c | |
parent | d6e1a495bd3ea25012ef907b23327e085f36be1c (diff) | |
download | ydb-fed8d432668e1993b6d0d429398d65aa40f3f5fe.tar.gz |
Update contrib/restricted/aws/s2n to 1.3.31
Diffstat (limited to 'contrib/restricted/aws/s2n/tls/s2n_client_finished.c')
-rw-r--r-- | contrib/restricted/aws/s2n/tls/s2n_client_finished.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/contrib/restricted/aws/s2n/tls/s2n_client_finished.c b/contrib/restricted/aws/s2n/tls/s2n_client_finished.c index 306f9b9ad7..b805a186a6 100644 --- a/contrib/restricted/aws/s2n/tls/s2n_client_finished.c +++ b/contrib/restricted/aws/s2n/tls/s2n_client_finished.c @@ -16,13 +16,10 @@ #include <stdint.h> #include "error/s2n_errno.h" - +#include "stuffer/s2n_stuffer.h" #include "tls/s2n_connection.h" #include "tls/s2n_tls.h" #include "tls/s2n_tls13_handshake.h" - -#include "stuffer/s2n_stuffer.h" - #include "utils/s2n_safety.h" S2N_RESULT s2n_finished_recv(struct s2n_connection *conn, uint8_t *our_version); @@ -51,14 +48,15 @@ int s2n_client_finished_send(struct s2n_connection *conn) return S2N_SUCCESS; } -int s2n_tls13_client_finished_recv(struct s2n_connection *conn) { +int s2n_tls13_client_finished_recv(struct s2n_connection *conn) +{ POSIX_ENSURE_EQ(conn->actual_protocol_version, S2N_TLS13); uint8_t length = s2n_stuffer_data_available(&conn->handshake.io); S2N_ERROR_IF(length == 0, S2N_ERR_BAD_MESSAGE); /* read finished mac from handshake */ - struct s2n_blob wire_finished_mac = {0}; + struct s2n_blob wire_finished_mac = { 0 }; s2n_blob_init(&wire_finished_mac, s2n_stuffer_raw_read(&conn->handshake.io, length), length); /* get tls13 keys */ @@ -69,7 +67,7 @@ int s2n_tls13_client_finished_recv(struct s2n_connection *conn) { struct s2n_hash_state *hash_state = &conn->handshake.hashes->hash_workspace; POSIX_GUARD_RESULT(s2n_handshake_copy_hash_state(conn, keys.hash_algorithm, hash_state)); - struct s2n_blob finished_key = {0}; + struct s2n_blob finished_key = { 0 }; POSIX_GUARD(s2n_blob_init(&finished_key, conn->handshake.client_finished, keys.size)); s2n_tls13_key_blob(client_finished_mac, keys.size); @@ -80,7 +78,8 @@ int s2n_tls13_client_finished_recv(struct s2n_connection *conn) { return 0; } -int s2n_tls13_client_finished_send(struct s2n_connection *conn) { +int s2n_tls13_client_finished_send(struct s2n_connection *conn) +{ POSIX_ENSURE_EQ(conn->actual_protocol_version, S2N_TLS13); /* get tls13 keys */ @@ -92,7 +91,7 @@ int s2n_tls13_client_finished_send(struct s2n_connection *conn) { POSIX_GUARD_RESULT(s2n_handshake_copy_hash_state(conn, keys.hash_algorithm, hash_state)); /* look up finished secret key */ - struct s2n_blob finished_key = {0}; + struct s2n_blob finished_key = { 0 }; POSIX_GUARD(s2n_blob_init(&finished_key, conn->handshake.client_finished, keys.size)); /* generate the hashed message authenticated code */ |