Add some new changes to support x509 signatures