[vlc-commits] keychain: fix errSecNoSuchAttr on iOS
Thomas Guillem
git at videolan.org
Thu Nov 14 15:24:09 CET 2019
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Nov 4 16:39:26 2019 +0100| [7c1da60ca1cb78c5a1cbb8bbcd1c1551e26143c4] | committer: Thomas Guillem
keychain: fix errSecNoSuchAttr on iOS
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7c1da60ca1cb78c5a1cbb8bbcd1c1551e26143c4
---
modules/keystore/keychain.m | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/modules/keystore/keychain.m b/modules/keystore/keychain.m
index 2e00f31f90..f7fa1532bb 100644
--- a/modules/keystore/keychain.m
+++ b/modules/keystore/keychain.m
@@ -92,7 +92,14 @@ static NSMutableDictionary * CreateQuery(vlc_keystore *p_keystore)
NSMutableDictionary *dictionary = [NSMutableDictionary dictionaryWithCapacity:3];
[dictionary setObject:(__bridge id)kSecClassInternetPassword forKey:(__bridge id)kSecClass];
+ /* kSecAttrService is only valid for kSecClassGenericPassword but not for
+ * kSecClassInternetPassword. Nevertheless, it is used on macOS for the
+ * wrong password type. It has always worked for now, and changing it would
+ * need to handle a password migration. Using this attribute on iOS cause a
+ * errSecNoSuchAttr error. */
+#if !TARGET_OS_IPHONE
[dictionary setObject:@"VLC-Password-Service" forKey:(__bridge id)kSecAttrService];
+#endif
char * psz_access_group = var_InheritString(p_keystore, "keychain-access-group");
if (psz_access_group) {
More information about the vlc-commits
mailing list