Prioritize user privacy and data security in your app. Discuss best practices for data handling, user consent, and security measures to protect user information.

All subtopics
Posts under Privacy & Security topic

Post

Replies

Boosts

Views

Activity

SecItemCopyMatching certificate not found
Hi, I'm adding certificate to keychain as describe Here I add the certificate to keychain successfully but when I try to fetch it, it always return error item not found (25300) I'm running on macOS Big Sur (ver 11.6) Below is the code. What am I missing ? Thanks, Tal // code that insert the certificate NSDictionary* addquery = @{ (id)kSecValueRef: (__bridge id)cert, (id)kSecClass: (id)kSecClassCertificate, (id)kSecAttrLabel: @"ClientCert"}; OSStatus status = SecItemAdd((__bridge CFDictionaryRef)addquery, nullptr); // code that fetch the certificate NSDictionary *queryDict = @{ (id) kSecClass : (id) kSecClassCertificate, (id) kSecAttrLabel : @"ClientCert", (id) kSecReturnRef : @YES}; auto sanityCheck = SecItemCopyMatching((__bridge CFDictionaryRef) queryDict, (CFTypeRef *) &m_client_cert);
7
0
1.3k
Nov ’21
SecIdentityCreateWithCertificate return errSecItemNotFound
I created public/private key with SecKeyCreateRandomKey. I then use openssl to create csr and a client certificate using the private key. The private key and certificate exist together in the keychain. I then query for the certificate with SecItemCopyMatching and use that certificate to create the identity: SecIdentityCreateWithCertificate( nullptr, client_cert, &identity) I get error result of errSecItemNotFound. Any idea what is wrong here ? I'm running on macOS version 11.6 Thanks, Tal
2
0
601
Nov ’21
how to extract text messages - financial service app
Hi, I work for an italian company that provides services for financial institutions. We're developing an iOS App that needs to access the following information (last 3 months): calls: type (in, out, missed), date and duration text messages: type (inbox, sent, draft), date and raw text list of bundle identifiers of each installed app internet provider name we read here https://developer.apple.com/app-store/app-privacy-details/ that regulated financial services has special treatment, and our app (published by an italian bank) surely fits the description. Can we receive technical specifications of how to read this information?
3
0
614
Nov ’21
I saved my customized identifier into the KeyChain on iOS.It will be shared in devices that using the same appleid?
I saved my customized identifier into the KeyChain on iOS.It will be shared in devices that using the same appleid? I've tryed with three iPhones, they are diffrent device type.I use my appleid to Login in iCloud.First step, I save one customized identifer by objective-c codes.Then debug on the other iPhones,but i can't get the identifer that saved in the first iPhone. But my some users found that they use a new iOS device,their new devices can use the old customized identifier directly while they use thire appleid to active new device.I need to know why?
0
0
701
Nov ’21
iOS 14: SecTrustEvaluateWithError Validate Non-Standard Critical Extensions
Hello! I have X.509 certificates for code signing in my application that have non-standard X.509 critical extensions. On Android, the trust evaluation APIs allow for a callback with unrecognised crit exts so that the app code can validate them. Is there something similar on iOS? Right now all calls to SecTrustEvaluateWithError fail with “Microsoft Corporation” has errors: Found unknown critical extensions
3
0
797
Dec ’21
export public key in pkcs8 format
Hi, I'm creating private/public key and try to export the public key to pkcs8 format with no success. I'm only able to get it in pkcs1 format. Creation of keys are done with SecKeyCreateRandomKey. I then use SecKeyCopyPublicKey to get the public key. Finally I use SecItemExport to get it to the desired format. When using it with parameter kSecFormatWrappedPKCS8, it failed with error errSecParam. I'm able to get it successful only like that: SecItemExport(m_public_key, kSecFormatOpenSSL, kSecItemPemArmour, nullptr, &data); Any idea why using kSecFormatWrappedPKCS8 failed ? Also, how can I convert it from PKCS1 to PKCS8 ? Thanks, Tal
1
1
1.2k
Nov ’21
What's team-scoped user identifier?
I am integrating with Sign In with Apple, but I've got confused by the doc. It says here and here that the user identifier is team-scoped and is the same across all the apps in the development team associated with my Apple Developer account. Now my questions are as follow: What if I leave the team? Will my app still get the old user identifier? Likewise, what if I joined a team? Does it mean that apps developed by different developers get the same user identifier as long as these developers are in the same team? How does it work if I join multiple teams?
0
0
957
Dec ’21
Using FaceID for Accessibility Features Other Than Authentication
Hi all, I'm wondering if anyone has built apps specifically using FaceID, does apple allow developers to access FaceID source to develop app for features other than authentication? For example: Apple uses FaceID for attention awareness when diming the screen... I'd like to know if there are any apps out there that take advantage of the FaceID hardware in other ways?
1
1
1.4k
Dec ’21
Apple is deceiving our/iCloud Private Relay users? Ideas?
In the user interface, Apple says: iCloud Private Relay keeps your internet activity private Private Relay hides your IP address and browsing activity in Safari and protects your unencrypted internet traffic so that no one-including Apple-can see both who you are and what sites you're visiting BUT when I look at the Apple IT support documentation the above is contradicted. Based on it, what would be true is: iCloud Private Relay keeps your WEB activity private Private Relay hides your IP address and browsing activity in Safari and protects your unencrypted WEB and UNENCRYPTED APP traffic. In addition to the corrections I made above, the rest of it (below) is just…terribly problematic! I’m not even sure how to correct it but it’s wrong. Agreed? I mean any aware user is (likely) going to know that if you tell a website like your bank) who you are, while using iCloud private relay (IPR), it will know who and where you are. But they’ll also know your IP, since Apple is saying only to us that encrypted internet traffic doesn’t go through IPR. This would include HTTPS, SMTPS, IMAPS, GOPHERS, … And even a fairly savvy user reading the following isn’t going to realize that Apple is not fixing the Panopticon problem, meaning that as is, the following part is generally false and de deceiving: …so that no one-including Apple-can see both who you are and what sites you're visiting. What’s a customer going to think when they realize that our apps aren’t delivering what Apple‘s promising because it’s inconsistent about what is promising to who? Is there already discussion going on about this? seems like a big issue… Fortunately, Apple is saying the product is in beta, so they will likely be extra open to and relatively responsive to feedback. But I wanted to talk with other developers about it so that’s why am bringing it up here. Maybe I’m misunderstanding stuff.
3
0
2.4k
Dec ’21
SecKeyRawSign using RSA & MD5
First of all I know MD5 is "broken" and we shouldn't be using it but it's not my choice and there is legacy code I need to work with so for now at least I need to sign some data using MD5 and a RSA signing Key. I think this is enough to explain the problem but I can share more code if needed. I'm using this to sign: let result = SecKeyRawSign(privateKey, SecPadding.PKCS1MD5, digestData.arrayOfBytes(), digestData.count, &signatureBytes, &signatureDataLength) But that throws the error OSStatusCode -50 (parameter error from the Security framework) If I change the padding to SecPadding.PKCS1SHA256 it works and after testing all the SecPadding options: Fails with OSStatus -50: OAEP sigRaw PKCS1MD2 PKCS1MD5 Works: PKCS1 PKCS1SHA1 PKCS1SHA224 PKCS1SHA256 PKCS1SHA384 PKCS1SHA512 The digestData is created using CC_MD5 no matter which padding I've used so its stranger that it works with the SHA padding but not with MD5. I'm getting a similar error when attempting to do this using the SwCrypt library, when using MD5 & PKCS1 padding I get the OSStatus -4300 which is a parameter error from CommonCrypto. let result = try CC.RSA.sign(paramString.data(using: .utf8)!, derKey: der, padding: .pkcs15, digest: .md5, saltLen: 0) However I don't get an error if using the pss padding option. So my question/s then, why am I getting this parameter error when using MD5 and PKCS1? Is it because use of MD5 is deprecated or could there be some problem with another parameter? Any pointers would be greatly appreciated, I've been stuck trying to implement this all week.
1
0
1.3k
Dec ’21
Do Verification code generated using otpauth url in iPhone device password app gets autofill in app UITextField ?
I am working on a small PoC on iCloud Key Chain Secure Login with Verification code after going through this video. WWDC 2021 video, Secure Login with iCloud KeyChain I am using my github account credentials to generate 2 facor authentication : Otpauth url which I am using is : "apple-otpauth://totp/Github:MyGithubUserName?"+"secret=IssuerSecretKey&digits=6&period=30&issuer=github.com" Steps which I am following : Deleted 2 factor from my GitHub account on browser and deleted google authenticator app fro, iphone device. Added my GitHub credentials in device settings - password app In demo project, I have added one textfield and one button, textfield content type is .oneTimeCode and keyboard type as number pad. Added above mentioned hardcoded GitHub otpauth url on button tap which navigates to password app and generate verification code. Issue which I am facing is, Verification code is generated in device >> settings >> password section, but that verification code is not automatically get pasted in app textfield. Quickbar is not enabled for the Textfield for verification code. My UITextfield code is : securityCodeTextField.textContentType = .oneTimeCode securityCodeTextField.autocorrectionType = .no If I change textField to .userName then userName gets automatically filled in UITextfield. Kindly help me what I am missing.
0
0
791
Dec ’21
How to find out the type of a file system object when handling ES_EVENT_TYPE_AUTH_CREATE?
The ES_EVENT_TYPE_AUTH_CREATE event can be fired either for a regular file or for a directory. Currently there is no such kind of information in the event structure. Is there any way to find out what exactly the kind of the object is being created right in the ES_EVENT_TYPE_AUTH_CREATE handler? Thanks in advance, Aleksandr Skobelev
1
0
1k
Dec ’21
SecTrust APIs failing due to key size for ECC certificate
Hello, We are attempting to use the SecTrust APIs to extract the public key from a certificate and evaluate a certificate chain. However, we are running into an issue where this is failing due to a "weak key size". For example, once we have created a SecTrust object for our certificate and attempt to extract the public key using SecTrustCopyKey we get this error in the console: [seckey] SecKeyCreate init(ECPublicKey) failed: -26275 Additionally when we attempt to run SecTrustEvaluateWithError we get: Optional<CFDictionaryRef>  ▿ some : 3 elements   ▿ 0 : 2 elements    - key : TrustResultDetails    ▿ value : 1 element     ▿ 0 : 2 elements      ▿ 0 : 2 elements       - key : WeakKeySize       - value : 0      ▿ 1 : 2 elements       - key : MissingIntermediate       - value : 0   ▿ 1 : 2 elements    - key : TrustResultValue    - value : 6   ▿ 2 : 2 elements    - key : TrustEvaluationDate    - value : 2021-12-06 23:10:09 +0000 For reference the certificate we are using has the following attributes: Signature algorithm: sha384ECDSA Public key: ECC (384 bits) We have done some research and found this notice regarding key sizes here: https://support.apple.com/en-au/HT210176 However as far we can tell that should only apply to RSA keys and not ECC. We're also not using these certificates for TLS connections. We have done some further testing using OpenSSL and didn't run into any issues using these certificates, so we suspect this issue is specific to Apple's APIs. Any advice would be appreciated. Thanks!
1
0
1.2k
Dec ’21
App rejection due to bluetooth permission not added in info.plist
My app got rejected as bluetooth usage description not given in info.plist. We are not using any bluetooth feature inside the application. We have one third party SDK integrated in main app which will trigger the bluetooth api based on some configuration. We have not enabled sdk configuration which will trigger the bluetooth api. Is it required to provide bluetooth usage description in info.plist even though main app does not use this feature. Is there any other way by which apple will approve the app without giving this description.
2
0
821
Dec ’21
On Mac Keychains
IMPORTANT This post is now retired in favour of TN3137 On Mac keychain APIs and implementations. I’m leaving the original post here just for the record, but you should consider the official documentation authoritative. Greetings All I regularly talk to folks who are confused by keychains on the Mac. This is understandable as the Mac has three keychain APIs and two keychain implementations! This post is my attempt to describe how those fit together. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" On Mac Keychains macOS has three keychain APIs: Keychain (<KeychainCore.h>) — This originated on traditional Mac OS but was supported on Mac OS X (now macOS) as a compatibility measure. SecKeychain (<Security/SecKeychain.h>, <Security/SecKeychainItem.h>, <Security/SecKeychainSearch.h>) — This was introduced with Mac OS X [1] and was the standard macOS keychain API until recently. SecItem (<Security/SecItem.h>) — This was part of the original iOS SDK. It debuted on the Mac with macOS 10.6. The first API is now irrelevant. macOS has two keychain implementations: The file-based keychain The data protection keychain The file-based keychain has its origins on traditional Mac OS. The data protection keychain originated on iOS and came to macOS with the advent of iCloud Keychain on macOS 10.9. Note iOS and its child platforms only support the SecItem API with the data protection keychain implementation. The Keychain and SecKeychain APIs only talk to the file-based keychain. The SecItem API talks to either implementation. Specifically, it talks to the data protection keychain if you supply either the kSecUseDataProtectionKeychain or the kSecAttrSynchronizable attribute. If not, it talks to the file-based keychain. The file-based keychain is on the road to deprecation. It is not officially deprecated, but some of the APIs surrounding it are. For example, SecKeychainCreate was deprecated in macOS 12. Moreover, new features, like iCloud Keychain, are only supported by the data protection keychain. [1] Actually, I’m not 100% sure it was part of 10.0. The earliest macOS SDK that I have easy access to is the macOS 10.2 SDK, circa 2002, and it definitely has this API. API Differences The SecItem API is well aligned with the data protection keychain. When you use it to talk to the file-based keychain the API has to work through a shim. That shim has limitations. Some of those limitations are inherent to the keychain implementation. For example, the access control model of the file-based keychain is very different from that of the data protection keychain, and the shim can’t make up for that. However, some limitations are just bugs. If you’re porting iOS keychain code to the Mac, it’s best to target the data protection keychain. Mac Catalyst apps only have access to the data protection keychain. iOS Apps on Mac only have access to the data protection keychain. Implementation Differences Each keychain implementation uses its own access control model: The file-based keychain uses access control lists (SecAccess). The data protection keychain uses keychain access control groups, supplemented by an access control object (SecAccessControl). The keychain access control groups available to you in the data protection keychain are determined by code signing entitlements. See Sharing Access to Keychain Items Among a Collection of Apps. This means that the data protection keychain is only available to code that can carry an entitlement, that is, main executables like an app or an app extension. If you’re building library code then your data protection keychain access is determined by the app that loads your library. The data protection keychain is only available in a user login context. You cannot use it, for example, from a launchd daemon. The data protection keychain can hold all keychain item classes (Internet password, generic password, certificate, key). Only the password items are synchronised via iCloud Keychain. Modern keychain features are only supported by the data protection keychain, including: iCloud Keychain Protecting an item with biometrics (Touch ID and Face ID) Protecting a key with the Secure Enclave User Interface The Keychain Access application lets you manage both file-based keychains and the data protection keychain. The keychain list includes at least two file-based keychainS (login and System) and the data protection keychain (iCloud Keychain, if that’s enabled, otherwise Local Items). You can create, add, and remove keychains using commands on the File menu (New Keychain, Add Keychain, Delete Keychain). Keychain Access displays all keychain items in file-based keychains but only password items in the data protection keychain. The keychain support in the security command-line tool is primarily focused on the file-base keychain.
0
0
3.5k
Nov ’22
Accesing Keychain through a Passwor Autofill Extension
Currently, we are exploring ways to disable the "Save Password" prompt on Keychain. We want to manipulate the keychain access from our Password Autofill Extension using any kind of API or access to know the following: Know if Keychain is currently enabled. Retrieve passwords from Keychain. Edit passwords from Keychain Delete passwords from Keychain. Do any of this steps is possible?
0
0
778
Dec ’21
SecItemCopyMatching certificate not found
Hi, I'm adding certificate to keychain as describe Here I add the certificate to keychain successfully but when I try to fetch it, it always return error item not found (25300) I'm running on macOS Big Sur (ver 11.6) Below is the code. What am I missing ? Thanks, Tal // code that insert the certificate NSDictionary* addquery = @{ (id)kSecValueRef: (__bridge id)cert, (id)kSecClass: (id)kSecClassCertificate, (id)kSecAttrLabel: @"ClientCert"}; OSStatus status = SecItemAdd((__bridge CFDictionaryRef)addquery, nullptr); // code that fetch the certificate NSDictionary *queryDict = @{ (id) kSecClass : (id) kSecClassCertificate, (id) kSecAttrLabel : @"ClientCert", (id) kSecReturnRef : @YES}; auto sanityCheck = SecItemCopyMatching((__bridge CFDictionaryRef) queryDict, (CFTypeRef *) &m_client_cert);
Replies
7
Boosts
0
Views
1.3k
Activity
Nov ’21
SecIdentityCreateWithCertificate return errSecItemNotFound
I created public/private key with SecKeyCreateRandomKey. I then use openssl to create csr and a client certificate using the private key. The private key and certificate exist together in the keychain. I then query for the certificate with SecItemCopyMatching and use that certificate to create the identity: SecIdentityCreateWithCertificate( nullptr, client_cert, &identity) I get error result of errSecItemNotFound. Any idea what is wrong here ? I'm running on macOS version 11.6 Thanks, Tal
Replies
2
Boosts
0
Views
601
Activity
Nov ’21
how to extract text messages - financial service app
Hi, I work for an italian company that provides services for financial institutions. We're developing an iOS App that needs to access the following information (last 3 months): calls: type (in, out, missed), date and duration text messages: type (inbox, sent, draft), date and raw text list of bundle identifiers of each installed app internet provider name we read here https://developer.apple.com/app-store/app-privacy-details/ that regulated financial services has special treatment, and our app (published by an italian bank) surely fits the description. Can we receive technical specifications of how to read this information?
Replies
3
Boosts
0
Views
614
Activity
Nov ’21
I saved my customized identifier into the KeyChain on iOS.It will be shared in devices that using the same appleid?
I saved my customized identifier into the KeyChain on iOS.It will be shared in devices that using the same appleid? I've tryed with three iPhones, they are diffrent device type.I use my appleid to Login in iCloud.First step, I save one customized identifer by objective-c codes.Then debug on the other iPhones,but i can't get the identifer that saved in the first iPhone. But my some users found that they use a new iOS device,their new devices can use the old customized identifier directly while they use thire appleid to active new device.I need to know why?
Replies
0
Boosts
0
Views
701
Activity
Nov ’21
iOS 14: SecTrustEvaluateWithError Validate Non-Standard Critical Extensions
Hello! I have X.509 certificates for code signing in my application that have non-standard X.509 critical extensions. On Android, the trust evaluation APIs allow for a callback with unrecognised crit exts so that the app code can validate them. Is there something similar on iOS? Right now all calls to SecTrustEvaluateWithError fail with “Microsoft Corporation” has errors: Found unknown critical extensions
Replies
3
Boosts
0
Views
797
Activity
Dec ’21
export public key in pkcs8 format
Hi, I'm creating private/public key and try to export the public key to pkcs8 format with no success. I'm only able to get it in pkcs1 format. Creation of keys are done with SecKeyCreateRandomKey. I then use SecKeyCopyPublicKey to get the public key. Finally I use SecItemExport to get it to the desired format. When using it with parameter kSecFormatWrappedPKCS8, it failed with error errSecParam. I'm able to get it successful only like that: SecItemExport(m_public_key, kSecFormatOpenSSL, kSecItemPemArmour, nullptr, &data); Any idea why using kSecFormatWrappedPKCS8 failed ? Also, how can I convert it from PKCS1 to PKCS8 ? Thanks, Tal
Replies
1
Boosts
1
Views
1.2k
Activity
Nov ’21
What's team-scoped user identifier?
I am integrating with Sign In with Apple, but I've got confused by the doc. It says here and here that the user identifier is team-scoped and is the same across all the apps in the development team associated with my Apple Developer account. Now my questions are as follow: What if I leave the team? Will my app still get the old user identifier? Likewise, what if I joined a team? Does it mean that apps developed by different developers get the same user identifier as long as these developers are in the same team? How does it work if I join multiple teams?
Replies
0
Boosts
0
Views
957
Activity
Dec ’21
Using FaceID for Accessibility Features Other Than Authentication
Hi all, I'm wondering if anyone has built apps specifically using FaceID, does apple allow developers to access FaceID source to develop app for features other than authentication? For example: Apple uses FaceID for attention awareness when diming the screen... I'd like to know if there are any apps out there that take advantage of the FaceID hardware in other ways?
Replies
1
Boosts
1
Views
1.4k
Activity
Dec ’21
Apple is deceiving our/iCloud Private Relay users? Ideas?
In the user interface, Apple says: iCloud Private Relay keeps your internet activity private Private Relay hides your IP address and browsing activity in Safari and protects your unencrypted internet traffic so that no one-including Apple-can see both who you are and what sites you're visiting BUT when I look at the Apple IT support documentation the above is contradicted. Based on it, what would be true is: iCloud Private Relay keeps your WEB activity private Private Relay hides your IP address and browsing activity in Safari and protects your unencrypted WEB and UNENCRYPTED APP traffic. In addition to the corrections I made above, the rest of it (below) is just…terribly problematic! I’m not even sure how to correct it but it’s wrong. Agreed? I mean any aware user is (likely) going to know that if you tell a website like your bank) who you are, while using iCloud private relay (IPR), it will know who and where you are. But they’ll also know your IP, since Apple is saying only to us that encrypted internet traffic doesn’t go through IPR. This would include HTTPS, SMTPS, IMAPS, GOPHERS, … And even a fairly savvy user reading the following isn’t going to realize that Apple is not fixing the Panopticon problem, meaning that as is, the following part is generally false and de deceiving: …so that no one-including Apple-can see both who you are and what sites you're visiting. What’s a customer going to think when they realize that our apps aren’t delivering what Apple‘s promising because it’s inconsistent about what is promising to who? Is there already discussion going on about this? seems like a big issue… Fortunately, Apple is saying the product is in beta, so they will likely be extra open to and relatively responsive to feedback. But I wanted to talk with other developers about it so that’s why am bringing it up here. Maybe I’m misunderstanding stuff.
Replies
3
Boosts
0
Views
2.4k
Activity
Dec ’21
SecKeyRawSign using RSA & MD5
First of all I know MD5 is "broken" and we shouldn't be using it but it's not my choice and there is legacy code I need to work with so for now at least I need to sign some data using MD5 and a RSA signing Key. I think this is enough to explain the problem but I can share more code if needed. I'm using this to sign: let result = SecKeyRawSign(privateKey, SecPadding.PKCS1MD5, digestData.arrayOfBytes(), digestData.count, &signatureBytes, &signatureDataLength) But that throws the error OSStatusCode -50 (parameter error from the Security framework) If I change the padding to SecPadding.PKCS1SHA256 it works and after testing all the SecPadding options: Fails with OSStatus -50: OAEP sigRaw PKCS1MD2 PKCS1MD5 Works: PKCS1 PKCS1SHA1 PKCS1SHA224 PKCS1SHA256 PKCS1SHA384 PKCS1SHA512 The digestData is created using CC_MD5 no matter which padding I've used so its stranger that it works with the SHA padding but not with MD5. I'm getting a similar error when attempting to do this using the SwCrypt library, when using MD5 & PKCS1 padding I get the OSStatus -4300 which is a parameter error from CommonCrypto. let result = try CC.RSA.sign(paramString.data(using: .utf8)!, derKey: der, padding: .pkcs15, digest: .md5, saltLen: 0) However I don't get an error if using the pss padding option. So my question/s then, why am I getting this parameter error when using MD5 and PKCS1? Is it because use of MD5 is deprecated or could there be some problem with another parameter? Any pointers would be greatly appreciated, I've been stuck trying to implement this all week.
Replies
1
Boosts
0
Views
1.3k
Activity
Dec ’21
Do Verification code generated using otpauth url in iPhone device password app gets autofill in app UITextField ?
I am working on a small PoC on iCloud Key Chain Secure Login with Verification code after going through this video. WWDC 2021 video, Secure Login with iCloud KeyChain I am using my github account credentials to generate 2 facor authentication : Otpauth url which I am using is : "apple-otpauth://totp/Github:MyGithubUserName?"+"secret=IssuerSecretKey&digits=6&period=30&issuer=github.com" Steps which I am following : Deleted 2 factor from my GitHub account on browser and deleted google authenticator app fro, iphone device. Added my GitHub credentials in device settings - password app In demo project, I have added one textfield and one button, textfield content type is .oneTimeCode and keyboard type as number pad. Added above mentioned hardcoded GitHub otpauth url on button tap which navigates to password app and generate verification code. Issue which I am facing is, Verification code is generated in device >> settings >> password section, but that verification code is not automatically get pasted in app textfield. Quickbar is not enabled for the Textfield for verification code. My UITextfield code is : securityCodeTextField.textContentType = .oneTimeCode securityCodeTextField.autocorrectionType = .no If I change textField to .userName then userName gets automatically filled in UITextfield. Kindly help me what I am missing.
Replies
0
Boosts
0
Views
791
Activity
Dec ’21
How to find out the type of a file system object when handling ES_EVENT_TYPE_AUTH_CREATE?
The ES_EVENT_TYPE_AUTH_CREATE event can be fired either for a regular file or for a directory. Currently there is no such kind of information in the event structure. Is there any way to find out what exactly the kind of the object is being created right in the ES_EVENT_TYPE_AUTH_CREATE handler? Thanks in advance, Aleksandr Skobelev
Replies
1
Boosts
0
Views
1k
Activity
Dec ’21
SecTrust APIs failing due to key size for ECC certificate
Hello, We are attempting to use the SecTrust APIs to extract the public key from a certificate and evaluate a certificate chain. However, we are running into an issue where this is failing due to a "weak key size". For example, once we have created a SecTrust object for our certificate and attempt to extract the public key using SecTrustCopyKey we get this error in the console: [seckey] SecKeyCreate init(ECPublicKey) failed: -26275 Additionally when we attempt to run SecTrustEvaluateWithError we get: Optional<CFDictionaryRef>  ▿ some : 3 elements   ▿ 0 : 2 elements    - key : TrustResultDetails    ▿ value : 1 element     ▿ 0 : 2 elements      ▿ 0 : 2 elements       - key : WeakKeySize       - value : 0      ▿ 1 : 2 elements       - key : MissingIntermediate       - value : 0   ▿ 1 : 2 elements    - key : TrustResultValue    - value : 6   ▿ 2 : 2 elements    - key : TrustEvaluationDate    - value : 2021-12-06 23:10:09 +0000 For reference the certificate we are using has the following attributes: Signature algorithm: sha384ECDSA Public key: ECC (384 bits) We have done some research and found this notice regarding key sizes here: https://support.apple.com/en-au/HT210176 However as far we can tell that should only apply to RSA keys and not ECC. We're also not using these certificates for TLS connections. We have done some further testing using OpenSSL and didn't run into any issues using these certificates, so we suspect this issue is specific to Apple's APIs. Any advice would be appreciated. Thanks!
Replies
1
Boosts
0
Views
1.2k
Activity
Dec ’21
App rejection due to bluetooth permission not added in info.plist
My app got rejected as bluetooth usage description not given in info.plist. We are not using any bluetooth feature inside the application. We have one third party SDK integrated in main app which will trigger the bluetooth api based on some configuration. We have not enabled sdk configuration which will trigger the bluetooth api. Is it required to provide bluetooth usage description in info.plist even though main app does not use this feature. Is there any other way by which apple will approve the app without giving this description.
Replies
2
Boosts
0
Views
821
Activity
Dec ’21
On Mac Keychains
IMPORTANT This post is now retired in favour of TN3137 On Mac keychain APIs and implementations. I’m leaving the original post here just for the record, but you should consider the official documentation authoritative. Greetings All I regularly talk to folks who are confused by keychains on the Mac. This is understandable as the Mac has three keychain APIs and two keychain implementations! This post is my attempt to describe how those fit together. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" On Mac Keychains macOS has three keychain APIs: Keychain (<KeychainCore.h>) — This originated on traditional Mac OS but was supported on Mac OS X (now macOS) as a compatibility measure. SecKeychain (<Security/SecKeychain.h>, <Security/SecKeychainItem.h>, <Security/SecKeychainSearch.h>) — This was introduced with Mac OS X [1] and was the standard macOS keychain API until recently. SecItem (<Security/SecItem.h>) — This was part of the original iOS SDK. It debuted on the Mac with macOS 10.6. The first API is now irrelevant. macOS has two keychain implementations: The file-based keychain The data protection keychain The file-based keychain has its origins on traditional Mac OS. The data protection keychain originated on iOS and came to macOS with the advent of iCloud Keychain on macOS 10.9. Note iOS and its child platforms only support the SecItem API with the data protection keychain implementation. The Keychain and SecKeychain APIs only talk to the file-based keychain. The SecItem API talks to either implementation. Specifically, it talks to the data protection keychain if you supply either the kSecUseDataProtectionKeychain or the kSecAttrSynchronizable attribute. If not, it talks to the file-based keychain. The file-based keychain is on the road to deprecation. It is not officially deprecated, but some of the APIs surrounding it are. For example, SecKeychainCreate was deprecated in macOS 12. Moreover, new features, like iCloud Keychain, are only supported by the data protection keychain. [1] Actually, I’m not 100% sure it was part of 10.0. The earliest macOS SDK that I have easy access to is the macOS 10.2 SDK, circa 2002, and it definitely has this API. API Differences The SecItem API is well aligned with the data protection keychain. When you use it to talk to the file-based keychain the API has to work through a shim. That shim has limitations. Some of those limitations are inherent to the keychain implementation. For example, the access control model of the file-based keychain is very different from that of the data protection keychain, and the shim can’t make up for that. However, some limitations are just bugs. If you’re porting iOS keychain code to the Mac, it’s best to target the data protection keychain. Mac Catalyst apps only have access to the data protection keychain. iOS Apps on Mac only have access to the data protection keychain. Implementation Differences Each keychain implementation uses its own access control model: The file-based keychain uses access control lists (SecAccess). The data protection keychain uses keychain access control groups, supplemented by an access control object (SecAccessControl). The keychain access control groups available to you in the data protection keychain are determined by code signing entitlements. See Sharing Access to Keychain Items Among a Collection of Apps. This means that the data protection keychain is only available to code that can carry an entitlement, that is, main executables like an app or an app extension. If you’re building library code then your data protection keychain access is determined by the app that loads your library. The data protection keychain is only available in a user login context. You cannot use it, for example, from a launchd daemon. The data protection keychain can hold all keychain item classes (Internet password, generic password, certificate, key). Only the password items are synchronised via iCloud Keychain. Modern keychain features are only supported by the data protection keychain, including: iCloud Keychain Protecting an item with biometrics (Touch ID and Face ID) Protecting a key with the Secure Enclave User Interface The Keychain Access application lets you manage both file-based keychains and the data protection keychain. The keychain list includes at least two file-based keychainS (login and System) and the data protection keychain (iCloud Keychain, if that’s enabled, otherwise Local Items). You can create, add, and remove keychains using commands on the File menu (New Keychain, Add Keychain, Delete Keychain). Keychain Access displays all keychain items in file-based keychains but only password items in the data protection keychain. The keychain support in the security command-line tool is primarily focused on the file-base keychain.
Replies
0
Boosts
0
Views
3.5k
Activity
Nov ’22
Accesing Keychain through a Passwor Autofill Extension
Currently, we are exploring ways to disable the "Save Password" prompt on Keychain. We want to manipulate the keychain access from our Password Autofill Extension using any kind of API or access to know the following: Know if Keychain is currently enabled. Retrieve passwords from Keychain. Edit passwords from Keychain Delete passwords from Keychain. Do any of this steps is possible?
Replies
0
Boosts
0
Views
778
Activity
Dec ’21