From 18a0aa69a90efa06d9655532c15757128d8fa3b5 Mon Sep 17 00:00:00 2001 From: uroboro Date: Fri, 23 Oct 2026 12:28:52 +0200 Subject: [PATCH] Rename SPKICacheDictionnary to SPKICacheDictionary --- TrustKit/Pinning/TSKSPKIHashCache.h | 2 +- TrustKit/Pinning/TSKSPKIHashCache.m | 14 +++++++------- TrustKit/TSKPinningValidator_Private.h | 2 +- TrustKitTests/TSKPinningValidatorTests.m | 4 ++-- TrustKitTests/TSKPublicKeyAlgorithmTests.m | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/TrustKit/Pinning/TSKSPKIHashCache.h b/TrustKit/Pinning/TSKSPKIHashCache.h index ff6d4f7d..d6e62eed 100644 --- a/TrustKit/Pinning/TSKSPKIHashCache.h +++ b/TrustKit/Pinning/TSKSPKIHashCache.h @@ -28,7 +28,7 @@ NS_ASSUME_NONNULL_BEGIN static NSString * const kTSKSPKISharedHashCacheIdentifier = @"spki-hash.cache"; // Each key is a raw certificate data (for easy lookup) and each value is the certificate's raw SPKI data -typedef NSMutableDictionary SPKICacheDictionnary; +typedef NSMutableDictionary SPKICacheDictionary; @interface TSKSPKIHashCache : NSObject diff --git a/TrustKit/Pinning/TSKSPKIHashCache.m b/TrustKit/Pinning/TSKSPKIHashCache.m index 5ee28ddc..9cce4672 100644 --- a/TrustKit/Pinning/TSKSPKIHashCache.m +++ b/TrustKit/Pinning/TSKSPKIHashCache.m @@ -132,8 +132,8 @@ static unsigned int getAsn1HeaderSize(NSString *publicKeyType, NSNumber *publicK @interface TSKSPKIHashCache () -// Dictionnary to cache SPKI hashes instead of having to compute them on every connection -@property (nonatomic) SPKICacheDictionnary *spkiCache; +// Dictionary to cache SPKI hashes instead of having to compute them on every connection +@property (nonatomic) SPKICacheDictionary *spkiCache; @property (nonatomic) dispatch_queue_t lockQueue; @property (nonatomic) dispatch_queue_t persistenceQueue; @property (nonatomic) BOOL persistenceScheduled; @@ -143,7 +143,7 @@ @interface TSKSPKIHashCache () /** Load the SPKI cache from the filesystem. This triggers blocking file I/O. */ -- (SPKICacheDictionnary *)loadSPKICacheFromFileSystem; +- (SPKICacheDictionary *)loadSPKICacheFromFileSystem; @end @@ -300,7 +300,7 @@ - (void)schedulePersistence self.persistenceScheduled = YES; isProtectedDataAvailableAsync(self.persistenceQueue, ^(BOOL available) { - __block SPKICacheDictionnary *snapshot = nil; + __block SPKICacheDictionary *snapshot = nil; dispatch_sync(self.lockQueue, ^{ self.persistenceScheduled = NO; if (available) { @@ -324,13 +324,13 @@ - (void)schedulePersistence }); } -- (SPKICacheDictionnary *)loadSPKICacheFromFileSystem +- (SPKICacheDictionary *)loadSPKICacheFromFileSystem { NSMutableDictionary *spkiCache = nil; NSData *serializedSpkiCache = [NSData dataWithContentsOfURL:[self SPKICachePath]]; if (serializedSpkiCache) { NSError *decodingError = nil; - spkiCache = [NSKeyedUnarchiver unarchivedObjectOfClasses:[NSSet setWithArray:@[[SPKICacheDictionnary class], [NSData class]]] fromData:serializedSpkiCache error:&decodingError]; + spkiCache = [NSKeyedUnarchiver unarchivedObjectOfClasses:[NSSet setWithArray:@[[SPKICacheDictionary class], [NSData class]]] fromData:serializedSpkiCache error:&decodingError]; if (decodingError) { os_log_error(TSKLogHandle(), "Could not retrieve SPKI cache from the filesystem: %{public}@", decodingError); @@ -399,7 +399,7 @@ - (void)waitForPendingSubjectPublicKeyInfoDiskWrites } -- (SPKICacheDictionnary *)getSubjectPublicKeyInfoHashesCache +- (SPKICacheDictionary *)getSubjectPublicKeyInfoHashesCache { return _spkiCache; } diff --git a/TrustKit/TSKPinningValidator_Private.h b/TrustKit/TSKPinningValidator_Private.h index 3eb0b498..07288664 100644 --- a/TrustKit/TSKPinningValidator_Private.h +++ b/TrustKit/TSKPinningValidator_Private.h @@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN /** Initialize an instance of TSKPinningValidator. - @param domainPinningPolicies A dictionnary of domains and the corresponding pinning policy. + @param domainPinningPolicies A dictionary of domains and the corresponding pinning policy. @param hashCache The hash cache to use. If nil, no caching is performed, performance may suffer. @param ignorePinsForUserTrustAnchors Set to true to ignore the trust anchors in the user trust store @param validationCallbackQueue The queue used when invoking the validationResultHandler diff --git a/TrustKitTests/TSKPinningValidatorTests.m b/TrustKitTests/TSKPinningValidatorTests.m index 68c58960..494ed9fb 100644 --- a/TrustKitTests/TSKPinningValidatorTests.m +++ b/TrustKitTests/TSKPinningValidatorTests.m @@ -36,8 +36,8 @@ - (void)cancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge @interface TSKSPKIHashCache (TestSupport) - (void)resetSubjectPublicKeyInfoDiskCache; -- (NSMutableDictionary *)getSubjectPublicKeyInfoHashesCache; -- (NSMutableDictionary *)loadSPKICacheFromFileSystem; +- (NSMutableDictionary *)getSubjectPublicKeyInfoHashesCache; +- (NSMutableDictionary *)loadSPKICacheFromFileSystem; - (void)waitForPendingSubjectPublicKeyInfoDiskWrites; @end diff --git a/TrustKitTests/TSKPublicKeyAlgorithmTests.m b/TrustKitTests/TSKPublicKeyAlgorithmTests.m index 7bfb4932..bb60821f 100644 --- a/TrustKitTests/TSKPublicKeyAlgorithmTests.m +++ b/TrustKitTests/TSKPublicKeyAlgorithmTests.m @@ -23,7 +23,7 @@ @interface TSKSPKIHashCache (TestSupport) - (void)resetSubjectPublicKeyInfoDiskCache; -- (NSMutableDictionary *)getSubjectPublicKeyInfoHashesCache; +- (NSMutableDictionary *)getSubjectPublicKeyInfoHashesCache; @end