Skip to content

Commit 11da1c7

Browse files
authored
Merge pull request #309 from darsang/iOS17_Crash_Fix
Fix for crash reported on iOS 17 (Security.framework path issue)
2 parents e3a11e0 + 69e04fc commit 11da1c7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

TrustKit/Pinning/pinning_utils.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ SecCertificateRef getCertificateAtIndex(SecTrustRef serverTrust, CFIndex index)
5656
#endif
5757
SecCertificateRef certificate = NULL;
5858
void *_Security = dlopen("Security.framework/Security", RTLD_NOW);
59+
if (_Security == NULL) {
60+
_Security = dlopen("/System/Library/Frameworks/Security.framework/Security", RTLD_NOW);
61+
}
62+
5963
if (majorVersion >= osVersionThreshold)
6064
{
6165
CFArrayRef (*_SecTrustCopyCertificateChain)(SecTrustRef) = dlsym(_Security, "SecTrustCopyCertificateChain");

0 commit comments

Comments
 (0)