https://github.com/openssl/openssl/pull/21933 needs backporting to 3.1 branch
#21933 needs backporting to 3.1 branch