keychain

SecItemCopyMatching for Touch ID without passcode fallback

寵の児 提交于 2019-11-29 04:52:41
问题 I am using SecItemCopyMatching to fetch a keychain item protected by Touch ID. However, if Touch ID unlocking fails (or the user selects "Enter Passcode"), I want to present my own PIN-entry UI. I do not want the user to be presented with the system passcode entry UI at any point. LAContext 's evaluatePolicy method provides this, but does not offer any actual keychain security, merely local authentication. I therefore will not use LAContext to achieve this. Is this possible with

swift 2.0 keychain type errors for SecItemCopyMatching

我的未来我决定 提交于 2019-11-29 04:37:24
We had this snippet of code with the previous version of Swift var retrievedData: NSData? var extractedData: Unmanaged<AnyObject>? = nil let status = SecItemCopyMatching(keyChainQuery, &extractedData) if (status == errSecSuccess) { if let validExtractedData = extractedData { let opaque = validExtractedData.toOpaque() retrievedData = Unmanaged<NSData>.fromOpaque(opaque).takeUnretainedValue() } } However this now gives us the following error: Cannot convert value of type 'inout Unmanaged?' (aka 'inout Optional>') to expected argument type 'UnsafeMutablePointer' (aka 'UnsafeMutablePointer>') I'm

Can't import Code-signing Public or Private keys using Keychain access (Mac OS X Mavericks)

久未见 提交于 2019-11-29 03:10:57
In an attempt to build an iOS project (in XCode), I need to import my colleague's public and private keys for the code signing identity, but I am unable to do so because I get an error in Keychain Access that says "An error has occurred. Unable to import an item. / The contents of this item cannot be retrieved" FULL DETAILS: I have got two keys from my colleague's computer, exported them from his Keychain as two files: Roomer Inc.p12 (the private key) Roomer Inc.pem (the public key) When he exported these, he left the password blank (Although we also tried with a password of "test" and got the

Finding a certificate on iOS

空扰寡人 提交于 2019-11-29 02:08:02
Note this question is was asked in 2001. Things have changed. I have an iOS device that needs to access a Junos VPN. The opaque instructions from the Junos admin say that I have to retrieve a certificate that has been provisioned to the device using the Apple IPCU. I know that the cert is on the device (I can see it in Settings) and I can access the VPN though Mail, Safari and the Junos App. The Apple docs state that each app has its own keychain and yet all three of these apps can see the cert. The fact that Jusos can access a cert provisioned by IPCU implies that any app can access this

Is it possible to update a Keychain item's kSecAttrAccessible value?

会有一股神秘感。 提交于 2019-11-29 01:56:24
问题 Is it possible to update the value of the attribute kSecAttrAccessible of existing items in the Keychain? It seems that it cannot be changed after the item was added to the Keychain. The following steps back up my assumption. Add a new item to the Keychain: NSData *encodedIdentifier = [@"BUNDLE_IDENTIFIER" dataUsingEncoding:NSUTF8StringEncoding]; NSData *encodedPassword = [@"PASSWORD" dataUsingEncoding:NSUTF8StringEncoding]; // Construct a Keychain item NSDictionary *keychainItem =

Difference between Keychain and NSUserDefault?

廉价感情. 提交于 2019-11-29 01:53:39
I am new to objective C , I have created one application in that I have used both NSUserDefault and Keychain to store my user name and password. But I cant differentiate both. Please help to differentiate the both. Thank you. Aravindhan A keychain is an encrypted container that holds passwords for multiple applications and secure services. Apple Inc. uses keychains as password management system in Mac OS and iOS. NSUserDefaults Provides a way for application behavior customization based on user preferences. Belongs to the Foundation framework for Cocoa and Cocoa Touch. I got this from Tag

Getting Optional(“”) when trying to get value from KeyChain

一世执手 提交于 2019-11-29 01:32:49
When I try to get my keyChain value, it return a string containing: Optional("[thing in the KeyChain]") so, I tried to remove "Optional" by using a loop: var str = KeychainService.loadToken() for(var i = 0; i < 9 ; i++) { str[i] = "" } But i get a error: NSString does not have a member named 'subscript' The KeychainService class: import Foundation import Security let serviceIdentifier = "MySerivice" let userAccount = "authenticatedUser" let accessGroup = "MySerivice" // Arguments for the keychain queries let kSecClassValue = kSecClass.takeRetainedValue() as NSString let kSecAttrAccountValue =

iPhone-like Keychain in Android?

喜夏-厌秋 提交于 2019-11-29 01:20:22
I'm looking for something like the keychain on the iPhone, but for Android development. Something that gives me the possibility to save small key-value pairs, that are persistent and unchanged even if the user reinstalls the application. Is there something like that? Can I use the standard preferences that way? I would like to achieve a behavior in a way it works with games on a PC writing the save games to another folder so that after delete and later reinstall they are not lost. Edit The bounty run out without somebody mentioning the accountManager. I just stumbled over it. Wouldn't that be

Adding item to keychain using Swift

◇◆丶佛笑我妖孽 提交于 2019-11-28 23:01:07
问题 I'm trying to add an item to the iOS keychain using Swift but can't figure out how to type cast properly. From WWDC 2013 session 709, given the following Objective-C code: NSData *secret = [@"top secret" dataWithEncoding:NSUTF8StringEncoding]; NSDictionary *query = @{ (id)kSecClass: (id)kSecClassGenericPassword, (id)kSecAttrService: @"myservice", (id)kSecAttrAccount: @"account name here", (id)kSecValueData: secret, }; OSStatus = SecItemAdd((CFDictionaryRef)query, NULL); Attempting to do it in

Add codesign to private key ACL without Keychain

孤者浪人 提交于 2019-11-28 22:58:43
问题 I'm trying to set up continuous builds/integration for a stable of iPhone apps. I have: A dedicated Mac Mini. A user account named "build" Hudson set up as a LaunchAgent for build, by dropping a plist in /Users/build/Library/LaunchAgents Tried as a system-wide LaunchDaemon running as hudson, but then had no access to the build user's login keychain. Long story, full of heartache. The system set to automatically login "build" on startup, so that Hudson starts running. The big problem is