Open lvkv opened 7 months ago
It's probably this OpenSSL-specific encoding - https://www.openssl.org/docs/man3.3/man3/SSL_set_alpn_protos.html#NOTES
Ah, so there's a leading 2 there because the length of "h2"
is 2. I suppose that makes sense—I also only discovered this when switching from OpenSSL to Rustls.
There's a leading
\x02
here that isn't in the RFC, which instead specifiesb"h2"
: https://github.com/LucioFranco/tonic-openssl/blob/bdaaecda437949244a1b4d61cb39110c4bcad019/src/lib.rs#L31I could be wrong, but this appears to have been a holdover from the transition from NPN to ALPN.