Skip to content

OpenSSL version check in check_revocation_ocsp() #2704

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

Merged
merged 1 commit into from
Mar 18, 2025

Conversation

dcooper16
Copy link
Collaborator

Describe your changes

The current code for setting $host_header in check_revocation_ocsp() will not work for LibreSSL 3.*. In addition, the code uses $OPENSSL2, which is not defined. This PR fixes these issues.

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, indentation is five spaces and any line endings do not contain any blank chars
  • 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

@drwetter
Copy link
Collaborator

Hi David,
quick shot: OPENSSL2 is defined in the very beginning at L248. is not defined in 3.0 but in 3.2. Shouldn't it be better to define it in the very beginning like in 3.2 ?

The current code for setting $host_header in check_revocation_ocsp() will not work for LibreSSL 3.*. In addition, the code uses $OPENSSL2, which is not defined. This commit fixes these issues.
@dcooper16 dcooper16 force-pushed the ocsp_check_rev_ossl_ver_30 branch from 3b1ebd9 to c58d6cf Compare March 17, 2025 18:31
@dcooper16
Copy link
Collaborator Author

quick shot: OPENSSL2 is defined in the very beginning at L248. is not defined in 3.0 but in 3.2. Shouldn't it be better to define it in the very beginning like in 3.2 ?

Okay. I changed the PR to define OPENSSL2.

@drwetter drwetter self-assigned this Mar 18, 2025
@drwetter drwetter merged commit 8e55576 into testssl:3.0 Mar 18, 2025
2 checks passed
@drwetter
Copy link
Collaborator

Works also like a charm. Cool & thanks!

@dcooper16 dcooper16 deleted the ocsp_check_rev_ossl_ver_30 branch March 21, 2025 13:08
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