diff --git a/TrustKit/Pinning/TSKSPKIHashCache.h b/TrustKit/Pinning/TSKSPKIHashCache.h index 0ef77f9c..99562649 100644 --- a/TrustKit/Pinning/TSKSPKIHashCache.h +++ b/TrustKit/Pinning/TSKSPKIHashCache.h @@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN static NSString *const kTSKSPKISharedHashCacheIdentifier = @"spki-hash-v2.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 238ce884..27be3e0c 100644 --- a/TrustKit/Pinning/TSKSPKIHashCache.m +++ b/TrustKit/Pinning/TSKSPKIHashCache.m @@ -21,8 +21,8 @@ @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; @@ -31,7 +31,7 @@ @interface TSKSPKIHashCache () /** Load the SPKI cache from the filesystem. This triggers blocking file I/O. */ -- (SPKICacheDictionnary *)loadSPKICacheFromFileSystem; +- (SPKICacheDictionary *)loadSPKICacheFromFileSystem; @end @@ -140,7 +140,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) { @@ -162,12 +162,12 @@ - (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]]] + spkiCache = [NSKeyedUnarchiver unarchivedObjectOfClasses:[NSSet setWithArray:@[[SPKICacheDictionary class], [NSData class]]] fromData:serializedSpkiCache error:&decodingError]; if (decodingError) { @@ -200,7 +200,7 @@ - (void)waitForPendingSubjectPublicKeyInfoDiskWrites { ); } -- (SPKICacheDictionnary *)getSubjectPublicKeyInfoHashesCache { +- (SPKICacheDictionary *)getSubjectPublicKeyInfoHashesCache { return _spkiCache; } diff --git a/TrustKit/TSKPinningValidator_Private.h b/TrustKit/TSKPinningValidator_Private.h index 2bd6996b..a3342a93 100644 --- a/TrustKit/TSKPinningValidator_Private.h +++ b/TrustKit/TSKPinningValidator_Private.h @@ -21,7 +21,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 35972b6d..d5c64788 100644 --- a/TrustKitTests/TSKPinningValidatorTests.m +++ b/TrustKitTests/TSKPinningValidatorTests.m @@ -38,8 +38,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/TSKSPKIHashCacheTests.m b/TrustKitTests/TSKSPKIHashCacheTests.m index 7bfe1b24..dfb6aebf 100644 --- a/TrustKitTests/TSKSPKIHashCacheTests.m +++ b/TrustKitTests/TSKSPKIHashCacheTests.m @@ -23,7 +23,7 @@ @interface TSKSPKIHashCache (TestSupport) - (void)resetSubjectPublicKeyInfoDiskCache; -- (NSMutableDictionary *)getSubjectPublicKeyInfoHashesCache; +- (NSMutableDictionary *)getSubjectPublicKeyInfoHashesCache; @end @interface TSKSPKIHashCacheTests : XCTestCase