raise_unsupported_algorithm_impl() peeks the OpenSSL error queue but does not clear it on the ERR_R_UNSUPPORTED and ERR_R_FETCH_FAILED branches. Only the default: branch clears it, via raise_ssl_error_f(). The leftover entry is then reported by the next unrelated failure in the same thread:
get_asn1_utf8name_by_nid() has the same problem. It decides whether to fall back to the short name based on ERR_peek_last_error(), so a leftover error could make it raise instead of falling back.
Activity