Insane complexity is exactly why supporting client certs is a bad idea.
At the moment, I'm not that impressed with the testing since even making it build actually requires patching it! This is just due to one of the examples, but from the git history it's been broken since January.
So for every case I've seen, they'd have been ahead to issue credentials themselves and just skip client certs.