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

Sort TLS extensions #2689

Merged
merged 1 commit into from
Mar 11, 2025
Merged

Sort TLS extensions #2689

merged 1 commit into from
Mar 11, 2025

Conversation

dcooper16
Copy link
Collaborator

Describe your changes

This PR modifies testssl.sh so that run_server_defaults() prints the server's supported TLS extensions sorted by extension number rather than listing them in the order in which they were found. This simplifies comparing the results of two tests of a server using different versions of OpenSSL, as the two tests may not detect all of the extensions in the same order.

In order to simplify the sorting of the extensions, this PR changes $TLS_EXTENSIONS from a string to an array. In February 2017 comments were added (925e106) saying that it would be $TLS_EXTENSIONS were an array. So, this PR addresses those comments. However, it is possible that the reason for those comments no longer apply.

What is your pull request about?

  • Bug fix
  • Improvement
  • New feature (adds functionality)
  • Breaking change (bug fix, feature or improvement that would cause existing functionality to not work as expected)
  • Typo fix
  • Documentation update
  • Update of other files

If it's a code change please check the boxes which are applicable

  • For the main program: My edits contain no tabs and the indentation is five spaces
  • I've read CONTRIBUTING.md and Coding_Convention.md
  • I have tested this fix or improvement against >=2 hosts and I couldn't spot a problem
  • I have tested this new feature against >=2 hosts which show this feature and >=2 host which does not (in order to avoid side effects) . I couldn't spot a problem
  • For the new feature I have made corresponding changes to the documentation and / or to help()
  • If it's a bigger change: I added myself to CREDITS.md (alphabetical order) and the change to CHANGELOG.md

This commit modifies testssl.sh so that run_server_defaults() prints the server's supported TLS extensions sorted by extension number rather than listing them in the order in which they were found.

In order to simplify the sorting of the extensions, this commit changes $TLS_EXTENSIONS from a string to an array. In February 2017 comments were added (testssl@925e106) saying that it would be $TLS_EXTENSIONS were an array. So, this commit addresses those comments. However, it is possible that the reason for those comments no longer apply.
@drwetter drwetter merged commit 70e1c4d into testssl:3.2 Mar 11, 2025
2 checks passed
@drwetter
Copy link
Collaborator

Yeah, as I was reading #2686 yesterday, I was thinking "hmm, that could be put in the proper order" and same day you did it 👍

@dcooper16 dcooper16 deleted the sort_tls_extns branch March 11, 2025 14:42
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