IOSAD-172 Cache set passphrase IOSAD-172
authorDirk Zimmermann <dz@pep.security>
Sat, 27 Jun 2020 12:07:29 +0200
branchIOSAD-172
changeset 1497b6a43067e6ee
parent 1496 bcf11f44c719
child 1498 a1d672baac36
IOSAD-172 Cache set passphrase
pEpObjCAdapter/PEPInternalSession.m
     1.1 --- a/pEpObjCAdapter/PEPInternalSession.m	Sat Jun 27 12:04:42 2020 +0200
     1.2 +++ b/pEpObjCAdapter/PEPInternalSession.m	Sat Jun 27 12:07:29 2020 +0200
     1.3 @@ -1061,9 +1061,9 @@
     1.4          *error = nil;
     1.5      }
     1.6  
     1.7 -    NSString *normalized = [passphrase precomposedStringWithCanonicalMapping];
     1.8 +    NSString *normalizedPassphrase = [passphrase precomposedStringWithCanonicalMapping];
     1.9  
    1.10 -    if ([normalized length] > s_passphraseMaxNumberOfCodePoints) {
    1.11 +    if ([normalizedPassphrase length] > s_passphraseMaxNumberOfCodePoints) {
    1.12          if (error) {
    1.13              *error = [NSError errorWithDomain:PEPObjCAdapterEngineStatusErrorDomain
    1.14                                           code:PEPAdapterErrorPassphraseTooLong
    1.15 @@ -1072,6 +1072,8 @@
    1.16          }
    1.17      }
    1.18  
    1.19 +    [[PEPPassphraseCache sharedInstance] addPassphrase:normalizedPassphrase];
    1.20 +
    1.21      return YES;
    1.22  }
    1.23