Hello everyone, my question is how to programmatically sign the configuration file before downloading the file from the local server? I have a file of type .mobileconfig and a certificate file of type .pem with a key received from Zerossl. There are 3 chain certificates
-----BEGIN CERTIFICATE——
//some symbols
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE——
//some symbols
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE——
//some symbols
-----END CERTIFICATE-----
I manage to sign the certificate locally on the computer using terminal commands, but in my case I need to do it programmatically in Swift inside the app.
Could somebody please help me with it?
Can i write these commands programmatically in Swift?
Not on iOS:
-
iOS does not ship with a copy of the
openssl
command-line tool. -
Even if it did, an iOS app can’t spawn child processes.
You could implement this by adding the OpenSSL libraries to your app and then calling the same library routines that the openssl
command-line tool uses. This is exactly what I meant when I wrote “You will need to write or acquire your own CMS library.”
What’s your high-level goal here? Earlier you wrote:
before downloading the file from the local server?
Is this a server running inside your app? Or a server on the local network? If it’s the latter, why not do the profile generation on that server?
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"