During installation on iOS/macOS, digitally signed Apple configuration profile is shown with a green tick and corresponding note providing trust for the user. It is possible to use this command in Terminal to sign a .mobileconfig profile. However, it is easier to use a script which will request certificate file, private key and trust chain certificate in dialog.
First, create a new Automator Service named Sign MobileConfig.workflow in user folder
~/Library/Services
Then drag Run AppleScript element into Automator window, and fill it with the following code.
