https://searchfox.org/mozilla-central/source/security/nss/li...
As does webpki:
https://github.com/briansmith/webpki/blob/482627c40dad2148da...
But haven't tested it (or checked other libraries).
https://github.com/briansmith/webpki/issues/134
https://github.com/briansmith/webpki/issues/135