Skip to content

openssl: drop unused pre-OpenSSL3 ctx_option_t typedef#22197

Closed
vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:ossl-drop-unused-cond
Closed

openssl: drop unused pre-OpenSSL3 ctx_option_t typedef#22197
vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:ossl-drop-unused-cond

Conversation

@vszakats

Copy link
Copy Markdown
Member

Follow-up to 69c89bf #18330

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Removes the now-obsolete pre-OpenSSL 3 ctx_option_t fallback and simplifies the OpenSSL backend’s option-mask typedef selection, consistent with curl’s OpenSSL 3.0+ minimum (except for LibreSSL/BoringSSL-like backends).

Changes:

  • Reworks ctx_option_t typedef selection to prioritize LibreSSL, then BoringSSL-like, and otherwise default to a 64-bit option type.
  • Drops the pre-OpenSSL 3 unsigned long fallback (no longer reachable under the enforced OpenSSL 3.0+ minimum).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vszakats vszakats changed the title openssl: drop unused pre-OpenSSL3 ctx_option_t type openssl: drop unused pre-OpenSSL3 ctx_option_t typedef Jun 26, 2026
@vszakats vszakats closed this in 6163566 Jun 26, 2026
@vszakats vszakats deleted the ossl-drop-unused-cond branch June 26, 2026 19:13
vszakats added a commit that referenced this pull request Jun 26, 2026
By exposing and reusing existing custom type via `vtls/openss.h`.

Also:
- GHA/curl-for-win: test in CI by enabling building tests.
  Cost is 45s per job, so limit it to the gcc job.

Seen with Windows x64 gcc (not tested in CI prior to this patch):
```
tests/libtest/lib1587.c:50:7: error: conversion from 'opt1587' {aka 'long long unsigned int'} to 'long int' may change value [-Werror=conversion]
   50 |       SSL_CTX_set_options(info->internals, opts);
      |       ^~~~~~~~~~~~~~~~~~~
tests/libtest/lib1587.c:59:7: error: conversion from 'opt1587' {aka 'long long unsigned int'} to 'long int' may change value [-Werror=conversion]
   59 |       SSL_set_options(info->internals, opts);
      |       ^~~~~~~~~~~~~~~
```
Ref: https://github.com/curl/curl/actions/runs/28258372229/job/83727170184?pr=22195#step:3:4884

Ref: da2f05e #22198
Ref: 6163566 #22197
Follow-up to 3e40ccb #21290
Follow-up to 2db8ae4 #17809 #17801

Closes #22195
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants