...
This approach is supported by the SAML set of specifications. Find the details for References are here for Metadata for the OASIS Security Assertion Markup Language (SAML)
V2.03 <http://saml.xml.org/saml-specifications> and SAML V2.0 Metadata Interoperability Profile here: <http://wiki.oasis-open.org/security/SAML2MetadataIOP>.
Example: Generating a Self-Signed Certificate using OpenSSL
...