from https://www.opensource.apple.com/source/libsecurity_asn1/libsecurity_asn1-29908/asn1/