Adding support for optional X509 certificats.

I'm working with a client who needs who needs the optional X509Certificate element in their signatures. Added support to add that element given a certificate is given along with a signing key.