IOSAD-172 Sort out expired passphrases on the fly IOSAD-172
authorDirk Zimmermann <dz@pep.security>
Mon, 29 Jun 2020 16:39:43 +0200
branchIOSAD-172
changeset 1533ba55bf1eacf6
parent 1532 455eb191aa48
child 1534 49cd42b330f5
IOSAD-172 Sort out expired passphrases on the fly
pEpObjCAdapter/PEPPassphraseCache.m
     1.1 --- a/pEpObjCAdapter/PEPPassphraseCache.m	Mon Jun 29 16:39:43 2020 +0200
     1.2 +++ b/pEpObjCAdapter/PEPPassphraseCache.m	Mon Jun 29 16:39:43 2020 +0200
     1.3 @@ -97,7 +97,9 @@
     1.4      [resultingPassphrases addObject:@""];
     1.5      dispatch_sync(self.queue, ^{
     1.6          for (PEPPassphraseCacheEntry *entry in self.mutablePassphraseEntries) {
     1.7 -            [resultingPassphrases addObject:entry.passphrase];
     1.8 +            if (![self isExpiredPassphraseEntry:entry]) {
     1.9 +                [resultingPassphrases addObject:entry.passphrase];
    1.10 +            }
    1.11          }
    1.12      });
    1.13      return [NSArray arrayWithArray:resultingPassphrases];