Is it possible to access the certificate by which the app is signed through some non – private API in order to encrypt data for exchanging with a server?
In fact I have (for instance) a web service and I want only my own iOS app access it. I came up with the idea of using the certificate by which the code is signed to encrypt something (say a constant data) with the certificate private key on client app and decrypt it on server with the certificate public key (to extract that said constant data) to check app identity.
As each iOS app is signed with unique certificate therefore each app can be identified this way.
Is this method correct and possible?
Is there any API to access app certificate and doing such calculation?
Thanks for your help,