keychain

Listing system keychain certificates

血红的双手。 提交于 2019-12-07 07:49:32
问题 I'm developing an iOS application which needs access to the system certificates and keys for digitally signing data. I've done some research and I've found that theoretically it's not possible from a third party app to get access to the system keychain since it only has access to its own keychain. Here is a stackoverflow post explaining that. However, some applications like the Cisco AnyConnect show a list with all the system certificates for VPN configuration. That might mean that THERE

KeychainItemWrapper crash on iOS10

吃可爱长大的小学妹 提交于 2019-12-07 04:56:21
问题 When I try to add the item to Keychain i found this crash on iOS10 *** Assertion failure in -[KeychainItemWrapper writeToKeychain] On iOS 9.3 I write the key in the keychain without problem Thanks 回答1: It looks like a bug; a bug report has been filed, but there's a workaround. Just enable "Keychain Sharing" (under your app -> Capabilities tab in Xcode). See https://forums.developer.apple.com/thread/51071 for full background. 回答2: Edit: Ignore what I was rambling about... duh, forgot that

how to obtain SecIdentityRef from SecCertificateRef and PrivateKey?

一世执手 提交于 2019-12-07 04:38:45
问题 How to create a SecIdentityRef if you have a SecCertificateRef and Private Key in iOS? I have a X509 certificate which is passed from server and an associated private key, but now I am struggling to establish trust in NSURLCredentials . A similar question was asked here How to establish a SecIdentityRef in an iPhone keychain ? (Without a .p12) As mentioned IMPORTANT in above post, i did create SecCertificateRef using SecCertificateCreateWithData first and then added into the keychain using

Reading from Keychain Xcode 9 simulators returns nothing

雨燕双飞 提交于 2019-12-07 04:08:17
问题 Since I'm using Xcode 9, all unit tests communicating with keychain are broken. It also happens with Xcode GM. As I traced, there is no OSStatus errors while reading and writing but reading from keychain returns nothing and causes failure for all unit tests using keychain. I've already faced something like this when Apple released Xcode 8 with iOS 10 simulator which keychain was not working and Apple fixed that in Xcode 8.2. Is anybody else facing this issue with iOS 11 simulator too? Any

install X509 certificate programmatically in my case

不问归期 提交于 2019-12-07 01:33:49
问题 I am developing an Android project. I have a PEM certificate string: -----BEGIN CERTIFICATE----- MIIEczCCA1ugAwIBAgIBADANBgkqhkiG9w0BAQQFAD..AkGA1UEBhMCR0Ix EzARBgNVBAgTClNvbWUtU3RhdGUxFDASBgNVBAoTC0..0EgTHRkMTcwNQYD VQQLEy5DbGFzcyAxIFB1YmxpYyBQcmltYXJ5IENlcn..XRpb24gQXV0aG9y ...MANY LINES... It8una2gY4l2O//on88r5IWJlm1L0oA8e4fR2yrBHX..adsGeFKkyNrwGi/ 7vQMfXdGsRrXNGRGnX+vWDZ3/zWI0joDtCkNnqEpVn..HoX -----END CERTIFICATE----- (I assigned above certificate string to a variable named CERT_STR ) I

Add a keychain to search list?

隐身守侯 提交于 2019-12-06 18:52:41
问题 I need to add a .keychain file to my keychains search list for some automated build tools. Currently I'm using security list-keychains command: list-keychains [-h] [-d user|system|common|dynamic] [-s [keychain...]] Display or manipulate the keychain search list. This command let's you set the entire keychain search list, but it does not provide a way to simply add another keychain. So adding a keychain becomes a 2 step process. Run list-keychains and parse the output Then do something like

GIDSignIn keychain error iOS 10 Xcode 8

对着背影说爱祢 提交于 2019-12-06 17:33:36
问题 In iOS 10 and xcode 8 when I try to sign in to google services I get "keychain error" func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!){ if error != nil { print("\(error!.localizedDescription)") } } Offered and accepted solutions on SO are to run the app direct from simulator and not via Xcode. This I have tried and have had no success hence posting this question here in the hope someone has a more recent solution or experience. 回答1: The problem you

iOS app cannot be opened after update

风流意气都作罢 提交于 2019-12-06 10:35:58
We have an app live in the app store for almost an year, and we've been receiving several bad reviews from customer which cannot open the app after updating it. Users have reported they are unable to launch the application following deleting and subsequently reinstalling the application. One user did indicate they could launch the application only following a factory reset of their iPhone. We believed the issue was related to the Keychain, since this seems to be persistent in the system. For this reason we updated the third party library we are using to access the keychain to https://github

when should i store and re-store to keychain on ios swift?

五迷三道 提交于 2019-12-06 07:03:28
问题 I see in the appDelegate few methods and I'm not sure if storing and re-storing user state in just some of them covers all scenarios? func applicationWillResignActive(application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to

In iOS10, is it possible to access Keychain from within a static library/framework, for unit testing

走远了吗. 提交于 2019-12-06 05:37:03
问题 Until Xcode 8/iOS 10, I was able to access the Keychain from within the unit tests of a static library. After upgrading, I get an error, see stack trace: failed: caught "NSInternalInconsistencyException", "Couldn't add the Keychain Item." ( 0 CoreFoundation 0x000000010b2a734b __exceptionPreprocess + 171 1 libobjc.A.dylib 0x000000010ad0821e objc_exception_throw + 48 2 CoreFoundation 0x000000010b2ab442 +[NSException raise:format:arguments:] + 98 3 Foundation 0x000000010a89eedd -