[tor-commits] [tor/master] Turn X509 certificates into a first-class type and add some functions