I tried that sudo -u _securityagent /Applications/HostApp.app/Contents/MacOS/HostApp for my app.
But I am receiving the following error: Illegal instruction: 4
I want to be able to use identities on a Cryptographic Token from codesign when codesign is running in the context of a script started by a daemon. Do you know how I can do that?
Right now if I tried to codesign under daemon context using Popen I received the following error: 'error: The specified item could not be found in the keychain.\n'.