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

Select cipher suites (2.) #148

Merged
merged 3 commits into from
Apr 17, 2023
Merged

Select cipher suites (2.) #148

merged 3 commits into from
Apr 17, 2023

Conversation

boaks
Copy link
Contributor

@boaks boaks commented Jun 23, 2022

Add callback for peer specific selection of cipher suites.

@boaks boaks mentioned this pull request Jun 23, 2022
@boaks boaks changed the title Select cipher suites Select cipher suites (2.) Jun 23, 2022
@boaks
Copy link
Contributor Author

boaks commented Nov 28, 2022

As preparation for the implementation of RFC5746.

@boaks boaks force-pushed the select_cipher_suites_2 branch 2 times, most recently from 74efc17 to a2d5465 Compare November 28, 2022 16:11
@boaks
Copy link
Contributor Author

boaks commented Nov 28, 2022

:-) the tests makefile doesn't support a common .o for the server and client.
The "fast and dirty" would be to include the .c

Any other ideas?

@boaks boaks force-pushed the select_cipher_suites_2 branch 2 times, most recently from c1499e9 to a29015a Compare December 5, 2022 07:05
@boaks boaks mentioned this pull request Dec 11, 2022
@boaks boaks mentioned this pull request Jan 24, 2023
@boaks
Copy link
Contributor Author

boaks commented Jan 24, 2023

Updated to include the dtls_user_parameters_t of PR #182.

@boaks
Copy link
Contributor Author

boaks commented Jan 24, 2023

Uups, sorry the source formatting of the previous add_ccm got lost.
I will fix it tomorrow.

@boaks boaks force-pushed the select_cipher_suites_2 branch 2 times, most recently from 10cdae6 to 7919e5c Compare January 25, 2023 09:02
@boaks
Copy link
Contributor Author

boaks commented Jan 25, 2023

Polished :-).

Copy link
Contributor

@obgm obgm left a comment

Choose a reason for hiding this comment

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

A few minor comments.

I suggest the following change to tests/Makefile.in instead of including the dtls_cipher_util.c sources.

diff --git a/tests/Makefile.in b/tests/Makefile.in
index a3097d9..6b6d8bb 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -28,10 +28,10 @@ top_srcdir:= @top_srcdir@
 
 # files and flags
 SOURCES:= dtls-server.c ccm-test.c \
-  dtls-client.c
+  dtls-client.c dtls_ciphers_util.c
   #cbc_aes128-test.c #dsrv-test.c
 OBJECTS:= $(patsubst %.c, %.o, $(SOURCES))
-PROGRAMS:= $(patsubst %.c, %, $(SOURCES))
+PROGRAMS:=dtls-server dtls-client ccm-test
 HEADERS:=
 CFLAGS:=-Wall -std=c99 @CFLAGS@ @WARNING_CFLAGS@ $(EXTRA_CFLAGS) -D_GNU_SOURCE
 CPPFLAGS:=-I$(top_srcdir) @CPPFLAGS@
@@ -47,6 +47,8 @@ FILES:=Makefile.in $(SOURCES) ccm-testdata.c #cbc_aes128-testdata.c
 
 all:   $(PROGRAMS)
 
+dtls-client dtls-server:: dtls_ciphers_util.o
+
 check:
        echo DISTDIR: $(DISTDIR)
        echo top_builddir: $(top_builddir)

tests/dtls-client.c Outdated Show resolved Hide resolved
tests/dtls-client.c Outdated Show resolved Hide resolved
tests/dtls-client.c Outdated Show resolved Hide resolved
tests/dtls-client.c Outdated Show resolved Hide resolved
tests/dtls-server.c Outdated Show resolved Hide resolved
dtls.c Outdated Show resolved Hide resolved
dtls.c Show resolved Hide resolved
dtls.c Outdated Show resolved Hide resolved
dtls.c Outdated Show resolved Hide resolved
dtls.c Outdated Show resolved Hide resolved
@boaks
Copy link
Contributor Author

boaks commented Mar 1, 2023

Currently the console lines of the client and server exceeds the 80 characters. I would prefer to fix that with the PR for RFC5746.

@obgm
Copy link
Contributor

obgm commented Mar 31, 2023

Thanks for doing the updates. Do you have an opinion on the discussion topics that you have not addressed so far?

@boaks
Copy link
Contributor Author

boaks commented Mar 31, 2023

Do you have an opinion on the discussion topics that you have not addressed so far?

Depends on the topics. To be frank, this PR spans now a long time. So I'm not sure, If I forgot something, if something is done in an other PR or what ever. If you like, just list or "renew" this other topics and we see, how we can deal with them.

@obgm
Copy link
Contributor

obgm commented Mar 31, 2023

Here is the list. "Don't care" would be a valid reaction....:

Typos (did not check if they are fixed and just did not show up with this comment; feel free to ignore):

suites.

Adds dtls_user_parameters_t for these user parameters.

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

boaks commented Apr 1, 2023

Except the topic with using utlist/uthash instead of a own array based implementation the other topics of the list are addressed. Please have a final check, then I would go to squash and merge this PR together with PR #147 into "main".

Introduce new cli argument -c.

Signed-off-by: Achim Kraus <[email protected]>
@boaks boaks merged commit 90ca321 into eclipse:main Apr 17, 2023
@boaks boaks deleted the select_cipher_suites_2 branch April 17, 2023 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants