-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add unittest for different openssl versions #2628
Conversation
This adds a unit test to compare a run against google with the supplied openssl version vs /usr/bin/openssl . This would fix #2626. It looks like there are still points to clarify * NPN output is different (bug) * Newer openssl version claims it's ECDH 253 instead of ECDH 256. * Newer openssl version claims for 130x cipher it's ECDH 253, via sockets it´s ECDH/MLKEM. This seems a bug (@dcooper) A todo is also restricing the unit test to the one where openssl is being used. E.g. the ROBOT check and more aren't done with openssl. So there's no value checking this here.
I noticed the documentation for
I believe this is an issue that has come up before. The information in the KeyExch. column has only limited meaning since it reports what key exchange the server happened to select for one particular connection. In this case, the TLS 1.3 ciphers are being detected by OpenSSL in one case and using The only way to ensure consistent results is to always use |
FYI: When I test against google.com with /usr/bin/openssl on my computer I see some additional differences since my work computer is configured to disable options that are not NIST approved.
|
the NIST approved issue should only be relevant for testing (yours, unfortunately) but not for CI. |
For your comment above : Are you referring to I remember we had a discussion about the latter, maybe also in the context of unit tests but I wasn't able to find it. Personnally I need to sleep over it whether for consistency reasons we want to provide to the users the same result, independent on the openssl version used. Or whether we should live with that and for the sake of this test we just do some editing with perl. |
Both. The table below shows the group that the server will use depending on the TLS protocol version and the client that sends the ClientHello. testssl.sh uses the results from
It's really the same thing in both cases -- just the server choosing different groups depending on what is offered in the ClientHello. It just looks more different now since the output for the KeyExch. column looks different for X25519MLKEM768 than for P-256 or X25519.
|
thanks for clarifying |
* pattern search + replace for tls_sockets() vs. openssl * better error handling for invocations with perl functions system + die
This adds a unit test to compare a run against google with the supplied openssl version vs /usr/bin/openssl .
This would fix #2626.
It looks like there are still points to clarify
NPN output is different (bug)Newer openssl version claims it's ECDH 253 instead of ECDH 256.Newer openssl version claims for 130x cipher it's ECDH 253, via sockets it´s ECDH/MLKEM. This seems a bug (@dcooper16)A todo is also restricing the unit test to the one where openssl is being used. E.g. the ROBOT check and more aren't done with openssl. So there's no value checking this here.
What is your pull request about?
If it's a code change please check the boxes which are applicable
help()