From 666e658398e4593e79dd8410f8acff15f53bcc51 Mon Sep 17 00:00:00 2001 From: Reda Chouk Date: Tue, 1 Oct 2024 16:28:31 +0200 Subject: [PATCH] trailing spaces and overlong lines fixes --- src/tls.c | 5 +++-- src/tls13.c | 12 ++++++++---- tests/api.c | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/tls.c b/src/tls.c index 7774a85cb..2cf9fee42 100644 --- a/src/tls.c +++ b/src/tls.c @@ -1020,7 +1020,7 @@ static int Hmac_UpdateFinal_CT(Hmac* hmac, byte* digest, const byte* in, if (ret != 0) return ret; ret = Hmac_HashUpdate(hmac, in, (word32)(safeBlocks * blockSz - - WOLFSSL_TLS_HMAC_INNER_SZ)); + WOLFSSL_TLS_HMAC_INNER_SZ)); if (ret != 0) return ret; } @@ -1278,7 +1278,8 @@ int TLS_hmac(WOLFSSL* ssl, byte* digest, const byte* in, word32 sz, int padSz, #endif { ret = Hmac_UpdateFinal_CT(&hmac, digest, in, - (sz + hashSz + (word32)padSz + 1), (int)hashSz, myInner); + (sz + hashSz + (word32)padSz + 1), + (int)hashSz, myInner); } #else ret = Hmac_UpdateFinal(&hmac, digest, in, sz + hashSz + padSz + 1, diff --git a/src/tls13.c b/src/tls13.c index 2c772ed59..2b266d837 100644 --- a/src/tls13.c +++ b/src/tls13.c @@ -7604,7 +7604,8 @@ static int SendTls13EncryptedExtensions(WOLFSSL* ssl) /* This handshake message is always encrypted. */ sendSz = BuildTls13Message(ssl, output, sendSz, output + RECORD_HEADER_SZ, - (int)(idx - RECORD_HEADER_SZ), handshake, 1, 0, 0); + (int)(idx - RECORD_HEADER_SZ), + handshake, 1, 0, 0); if (sendSz < 0) return sendSz; @@ -8701,7 +8702,8 @@ static int SendTls13Certificate(WOLFSSL* ssl) { /* This message is always encrypted. */ sendSz = BuildTls13Message(ssl, output, sendSz, - output + RECORD_HEADER_SZ, (int)(i - RECORD_HEADER_SZ), handshake, 1, + output + RECORD_HEADER_SZ, (int)(i - RECORD_HEADER_SZ), + handshake, 1, 0, 0); if (sendSz < 0) return sendSz; @@ -9152,7 +9154,8 @@ static int SendTls13CertificateVerify(WOLFSSL* ssl) #endif /* !NO_RSA */ #ifdef HAVE_ECC if (ssl->hsType == DYNAMIC_TYPE_ECC) { - args->sigLen = (word32)args->sendSz - args->idx - HASH_SIG_SIZE - + args->sigLen = (word32)args->sendSz - args->idx - + HASH_SIG_SIZE - VERIFY_HEADER; #if defined(WOLFSSL_SM2) && defined(WOLFSSL_SM3) if (ssl->buffers.keyType != sm2_sa_algo) @@ -10868,7 +10871,8 @@ static int SendTls13Finished(WOLFSSL* ssl) input = output + Dtls13GetRlHeaderLength(ssl, 1); #endif /* WOLFSSL_DTLS13 */ - AddTls13HandShakeHeader(input, (word32)finishedSz, 0, (word32)finishedSz, finished, ssl); + AddTls13HandShakeHeader(input, (word32)finishedSz, 0, (word32)finishedSz, + finished, ssl); #if defined(WOLFSSL_RENESAS_TSIP_TLS) if (ssl->options.side == WOLFSSL_CLIENT_END) { diff --git a/tests/api.c b/tests/api.c index 563f477af..ddb242192 100644 --- a/tests/api.c +++ b/tests/api.c @@ -73124,7 +73124,7 @@ static int test_wolfSSL_TXT_DB(void) BIO_free(bio); /* Test index */ - ExpectIntEQ(TXT_DB_create_index(db, 3, NULL, + ExpectIntEQ(TXT_DB_create_index(db, 3, NULL, (wolf_sk_hash_cb)(long unsigned int)TXT_DB_hash, (wolf_lh_compare_cb)TXT_DB_cmp), 1); ExpectNotNull(TXT_DB_get_by_index(db, 3, (WOLFSSL_STRING*)fields));