Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions dtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,10 @@ memarray_t dtlscontext_storage;
* cookie := n bytes
* cipher_length := 2 bytes
* cipher suites (max) := 2 bytes + max * 2
* empty_renegotiation := 2 bytes

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, the 2 bytes in 2 bytes + max * 2 are already the new empty_renegotiation := 2 bytes.

I guess, this is a rudiment of changing the same code a couple of times over a longer period and also change the order of processing those changes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, ok, I will close this PR.

* compression_length := 1 byte
* compression := 1 byte
* extensions_length := 2 bytes => 10 + max * 2
* extensions_length := 2 bytes => 12 + max * 2
*
* client_cert_type := 6 bytes
* server_cert_type := 6 bytes
Expand All @@ -146,7 +147,7 @@ memarray_t dtlscontext_storage;
*/
#define DTLS_CH_LENGTH sizeof(dtls_client_hello_t) /* no variable length fields! */
#define DTLS_COOKIE_LENGTH_MAX 32
#define DTLS_CH_LENGTH_MAX DTLS_CH_LENGTH + DTLS_COOKIE_LENGTH_MAX + 10 + (2 * DTLS_MAX_CIPHER_SUITES) + 26 + 12
#define DTLS_CH_LENGTH_MAX DTLS_CH_LENGTH + DTLS_COOKIE_LENGTH_MAX + 12 + (2 * DTLS_MAX_CIPHER_SUITES) + 26 + 12
#define DTLS_HV_LENGTH sizeof(dtls_hello_verify_t)
/*
* ServerHello:
Expand Down