سؤال

Is it somehow possible to access a user's public key files (located in ~/.ssh) in a sandboxed Mac OSX application?

هل كانت مفيدة؟

المحلول

Apple consider SSH keys to be confidential user information. You must ask for permission to access them using NSOpenPanel.

نصائح أخرى

Nope. ~/.ssh is outside your sandbox, so you can't access it unless the user gives you permission (for example, by selecting a file inside it in an NSOpenPanel.)

Note that most keys and certificates are stored in the Keychain on Mac OS X rather than in a dot directory. The Keychain APIs are accessible even within a sandbox. Depending on what you're trying to do, you may be able to accomplish it through the keychain.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top