Added x509 support