More work on X509 functionality