diff --git a/libs/SmartStore/SmartStore/Classes/SFSmartStore.h b/libs/SmartStore/SmartStore/Classes/SFSmartStore.h index 20a9cb564f..4a66d98560 100755 --- a/libs/SmartStore/SmartStore/Classes/SFSmartStore.h +++ b/libs/SmartStore/SmartStore/Classes/SFSmartStore.h @@ -477,9 +477,9 @@ NS_SWIFT_NAME(SmartStore) /** * Return SQLCipher FIPS status - * @return 0 when using the community edition or the commercial edition and 1 when using the FIPS enabled enterprise edition + * @return true if using a FIPS enabled SQLCipher edition */ -- (NSString *)getCipherFIPSStatus NS_SWIFT_NAME(cipherFIPSStatus()); +- (BOOL)getCipherFIPSStatus NS_SWIFT_NAME(cipherFIPSStatus()); #pragma mark - Long operations recovery methods diff --git a/libs/SmartStore/SmartStore/Classes/SFSmartStore.m b/libs/SmartStore/SmartStore/Classes/SFSmartStore.m index e80fcedf3c..6b07c782fc 100755 --- a/libs/SmartStore/SmartStore/Classes/SFSmartStore.m +++ b/libs/SmartStore/SmartStore/Classes/SFSmartStore.m @@ -2041,9 +2041,10 @@ - (NSString*) getCipherProviderVersion return [[self queryPragma:@"cipher_provider_version"] componentsJoinedByString:@""]; } -- (NSString*) getCipherFipsStatus +- (BOOL) getCipherFipsStatus { - return [[self queryPragma:@"cipher_fips_status"] componentsJoinedByString:@""]; + NSString *cipherFIPSStatus = [[self queryPragma:@"cipher_fips_status"] componentsJoinedByString:@""]; + return [cipherFIPSStatus isEqualToString:@"1"]; } - (NSArray*) queryPragma:(NSString*) pragma diff --git a/libs/SmartStore/SmartStoreTests/SFSmartStoreTests.m b/libs/SmartStore/SmartStoreTests/SFSmartStoreTests.m index ba5a2cab7c..0765d68c03 100644 --- a/libs/SmartStore/SmartStoreTests/SFSmartStoreTests.m +++ b/libs/SmartStore/SmartStoreTests/SFSmartStoreTests.m @@ -123,8 +123,8 @@ - (void) testCipherProviderVersion - (void) testCipherFIPSStatus { - NSString* cipherFIPSStatus = [self.store getCipherFIPSStatus]; - XCTAssertEqualObjects(cipherFIPSStatus, @"0"); + BOOL cipherFIPSStatus = [self.store getCipherFIPSStatus]; + XCTAssertFalse(cipherFIPSStatus); } /**