crystal-lang / crystal

The Crystal Programming Language
https://crystal-lang.org
Apache License 2.0
19.21k stars 1.61k forks source link

Fix: don't hardcode alpn protocol byte size (OpenSSL) #14769

Closed ysbaddaden closed 4 days ago

ysbaddaden commented 4 days ago

For some reason OpenSSL used to negotiate the protocol by itself, without invoking the select callback, or maybe didn't respect the total bytesize when processing the alpn string.

That changed in the 3.0.14 and other bugfix releases of OpenSSL, which exposed the bug.

EDIT: the best proof is the fixed OpenSSL 3.0 test suite on CI :heavy_check_mark:

ysbaddaden commented 4 days ago

@beta-ziliani I'm just sweeping after my bugs: https://github.com/crystal-lang/crystal/commit/20d59b6db85936eaa24ff40364c1f3a7938092d4#diff-9ac7faab010739a786c76dbf215016472ad708410b39271b65437c616314a7d0R123

It only took 8 years to notice.