Connection Interrupted Error sudo -u _securityagent pluginkit -a /Applications/SmartCardApp.app/Contents/PlugIns/CssToken.appex

I tried to run the following command: sudo -u _securityagent pluginkit -a /Applications/SmartCardApp.app/Contents/PlugIns/CssToken.appex

But I am getting connection interrupted error. Do you know what that error means and how I can run that command successfully?

Replies

It seems like you’re trying to follow the process described in Authenticating Users with a Cryptographic Token. If so, you’re using the wrong command. Here’s the command from that doc:

sudo -u _securityagent /Applications/HostApp.app/Contents/MacOS/HostApp

Note that this is running the app containing your app ex [1], not the app ex itself.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] FYI, the terminology in that doc is incorrect. When talking about app extensions:

  • The host app is the one loading the plug-in.

  • The app in which the plug-in is embedded is the container app.

This stuff is clearly explained in the App Extension Programming Guide.

I’ve filed a bug to get the CryptoTokenKit doc fixed (r. 86843253).

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'.

But I am receiving the following error: Illegal instruction: 4

It sounds like your app crashed, probably due to a trap. That should have generated a crash report. If so, please post it here.

For advice on how to do that, see Posting a Crash Report.


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?

I’d be surprised if there were any way to make that work. CTK was designed to be used from a user context.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"