I made branch ticket28973_033 to test a fix here; it should also merge cleanly into 0.3.4, 0.3.5, and 0.4.0.
I expect that a few warnings will still happen with this branch: it waits for the bug to happen once before disabling TLS 1.3, by which point other TLS 1.3 connections may already be in progress.
I have tested this branch with a good OpenSSL version, but not with openssl 1.1.1a: I hope somebody else can do that.
I've tested this with chutney, openssl 1.1.1a, and git master, confirming that with this patch, chutney succeeds with openssl 1.1.1a, but fails without it.
Code seems to be called correctly when build against OpenSSL 1.1.1a.
The patch looks reasonable to me. Only minor nitpick I spot is to maybe use bool as type for openssl_bug_7712_is_present - it is not something I have a strong opinion about though.
Do you think this ticket should become about removing this bugfix at some point in the future? Having the checks for the -2 return value as a special case looks a bit funky if seen out of context even with the reference to the OpenSSL bug as a comment.
Code seems to be called correctly when build against OpenSSL 1.1.1a.
The patch looks reasonable to me. Only minor nitpick I spot is to maybe use bool as type for openssl_bug_7712_is_present - it is not something I have a strong opinion about though.
I don't think we require stdbool in 0.3.4.
Do you think this ticket should become about removing this bugfix at some point in the future? Having the checks for the -2 return value as a special case looks a bit funky if seen out of context even with the reference to the OpenSSL bug as a comment.
I think we should have a separate ticket for removing this fix once openssl 1.1.1a is long forgotten.