If you want to create .mobileconfig profile from a certificate (for example, to import into Munki), you can use Apple Configurator 2 to do so.
If you have your certificate already in your keychain, launch up Keychain Access.app and find the certificate you want to make into a .mobileconfig profile.
Right-click the certificate and select Export NAMEOFTHECERTIFICATE (export it as a .cer).
Then launch up Apple Configuration 2.app.
Select File and then New Profile
Select Certificates and then Configure.
Find and select the certificate you exported earlier.
Select File and then Save.
Pick a filename for your .mobileconfig, which you can deploy however you want (as I previously mentioned, you can import this into a Munki repo).