Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User parameter #182

Closed
wants to merge 8 commits into from
Closed

User parameter #182

wants to merge 8 commits into from

Conversation

boaks
Copy link
Contributor

@boaks boaks commented Dec 2, 2022

No description provided.

Add cipher suites with full 16 byte MAC.

Signed-off-by: Achim Kraus <[email protected]>
Use cipher_suite_param_t for cipher-suite specific mac_len and
key_exchange_algorithm. Introduce dtls_cipher_index_t for simplified
cipher-suite parameter lookup. Cleanup old functions.

Signed-off-by: Achim Kraus <[email protected]>
The tests makefile only supports simple test programs.
Use include instead of additional object files.

Signed-off-by: Achim Kraus <[email protected]>
Supports RFC5746 minimal version without renegotiation.

Signed-off-by: Achim Kraus <[email protected]>
Add detailed documentation about the message length calculations.
Add TLS_EMPTY_RENEGOTIATION_INFO_SCSV to DTLS_CH_LENGTH_MAX.
Remove eclipse_curves from ServerHello length.

Signed-off-by: Achim Kraus <[email protected]>
dtls.c Outdated
/* TLS_NULL_WITH_NULL_NULL must always be the last entry as it
* indicates the stop marker for the traversal of this table. */
TLS_NULL_WITH_NULL_NULL
TLS_NULL_WITH_NULL_NULL
Copy link
Contributor

Choose a reason for hiding this comment

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

Now the comment above this line is not aligned anymore.

user_parameters->force_renegotiation_info = force_renegotiation_info;
if (ciphers) {
int index = 0;
while (index <= DTLS_MAX_CIPHER_SUITES) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that this loop only does the correct thing if ciphers does not contain more than DTLS_MAX_CIPHER_SUITES elements because otherwise, the terminating TLS_NULL_WITH_NULL_NULL will be copied. Is this guaranteed?

Copy link
Contributor Author

@boaks boaks Jan 21, 2023

Choose a reason for hiding this comment

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

I considered, that the length of ciphers is not larger than DTLS_MAX_CIPHER_SUITES + 1.

The condition protects the destination array dtls_cipher_t cipher_suites[DTLS_MAX_CIPHER_SUITES + 1]; from overflow.

But I guess, it must be corrected to index < DTLS_MAX_CIPHER_SUITES to ensure, that there is space for a trailing TLS_NULL_WITH_NULL_NULL and that trailing TLS_NULL_WITH_NULL_NULL must be added in the case of reaching DTLS_MAX_CIPHER_SUITES.

I will adapt the implementation.

user_parameters->force_renegotiation_info = force_renegotiation_info;
if (ciphers) {
int index = 0;
while (index <= DTLS_MAX_CIPHER_SUITES) {
Copy link
Contributor

Choose a reason for hiding this comment

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

same as in dtls-client.c

@obgm
Copy link
Contributor

obgm commented Jan 20, 2023

Thank you very much for this proposal. I think that combining the user parameters into a single callback function results in a more compact and comprehensible configuration.

Callback for user parameters.
Includes cipher suites and flags to enforce security features.
Cleanup test dtls-client.

Signed-off-by: Achim Kraus <[email protected]>
@boaks
Copy link
Contributor Author

boaks commented Jan 24, 2023

Now included in PR #148 and PR #181 .

@boaks boaks closed this Jan 24, 2023
@boaks boaks mentioned this pull request Jan 24, 2023
@boaks boaks deleted the user_parameter branch April 17, 2023 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants