changed to x509 encoding