Skip to content

Mismatch between COMP_R_BROTLI_DEFLATE_ERROR and COMP_R_BROTLI_ENCODE_ERROR #26316

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

Closed
ZeroIntensity opened this issue Jan 4, 2025 · 1 comment
Labels
branch: master Merge to master branch branch: 3.2 Merge to openssl-3.2 branch: 3.3 Merge to openssl-3.3 branch: 3.4 Merge to openssl-3.4 triaged: bug The issue/pr is/fixes a bug

Comments

@ZeroIntensity
Copy link
Contributor

Hi! This was discovered by @picnixz when working on the ssl module in CPython upstream:

There seems to be a mismatch between one of the error codes in openssl.txt and the actual macro definition, which is screwing up a mechanism for handling errors on our end. The offending code is here:

# define COMP_R_BROTLI_ENCODE_ERROR 103

This differs from the provided openssl.txt file, which we use for code generation:

COMP_R_BROTLI_DEFLATE_ERROR:103:brotli deflate error
COMP_R_BROTLI_ENCODE_ERROR:106:brotli encode error

COMP_R_BROTLI_ENCODE_ERROR should be 103, not 106 here, and as far as I can tell, COMP_R_BROTLI_DEFLATE_ERROR doesn't exist anymore. It looks like things were changed in this commit: b67cb09

Let me or @picnixz know if there are any questions, thanks!

@ZeroIntensity ZeroIntensity added the issue: bug report The issue was opened to report a bug label Jan 4, 2025
@t8m t8m added branch: master Merge to master branch triaged: bug The issue/pr is/fixes a bug branch: 3.2 Merge to openssl-3.2 branch: 3.3 Merge to openssl-3.3 branch: 3.4 Merge to openssl-3.4 and removed issue: bug report The issue was opened to report a bug labels Jan 6, 2025
@t8m
Copy link
Member

t8m commented Jan 6, 2025

openssl.txt needs to be updated to reflect the reality in headers.

baentsch added a commit to baentsch/openssl that referenced this issue Jan 7, 2025
baentsch added a commit to baentsch/openssl that referenced this issue Jan 7, 2025
openssl-machine pushed a commit that referenced this issue Jan 9, 2025
Fixes #26316

Reviewed-by: Richard Levitte <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #26330)

(cherry picked from commit 3cfcf82)
openssl-machine pushed a commit that referenced this issue Jan 9, 2025
Fixes #26316

Reviewed-by: Richard Levitte <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #26330)

(cherry picked from commit 3cfcf82)
openssl-machine pushed a commit that referenced this issue Jan 9, 2025
Fixes #26316

Reviewed-by: Richard Levitte <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #26330)

(cherry picked from commit 3cfcf82)
Sashan pushed a commit to Sashan/openssl that referenced this issue Apr 23, 2025
Fixes openssl#26316

Reviewed-by: Richard Levitte <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from openssl#26330)
picnixz added a commit to python/cpython that referenced this issue Apr 25, 2025
OpenSSL 3.4.1 mnemonics are not compatible with OpenSSL 3.4.0 ones since
they were renumbered [1, 2]. Consequently, `_ssl_data_34.h` is renamed to
`_ssl_data_340.h` and `_ssl_data_34.h` now contains OpenSSL 3.4.1 mnemonics.

We also refine the mnemonics that are selected, discarding those that are
mnemonic-like but should not be used as such. More precisely, we remove
the ERR_LIB_MASK and ERR_LIB_OFFSET entries from OpenSSL 1.1.1 data.

[1]: openssl/openssl#26316
[2]: openssl/openssl#26388
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch: master Merge to master branch branch: 3.2 Merge to openssl-3.2 branch: 3.3 Merge to openssl-3.3 branch: 3.4 Merge to openssl-3.4 triaged: bug The issue/pr is/fixes a bug
Projects
None yet
Development

No branches or pull requests

2 participants