IOSAD-172 Implement configurePassphraseForNewKeys:enable:error IOSAD-172
authorDirk Zimmermann <dz@pep.security>
Sat, 27 Jun 2020 15:28:44 +0200
branchIOSAD-172
changeset 15196f4a4623bfe7
parent 1518 9b72d301ab28
child 1520 0a2da48f2b8b
IOSAD-172 Implement configurePassphraseForNewKeys:enable:error
pEpObjCAdapter/PEPInternalSession.m
     1.1 --- a/pEpObjCAdapter/PEPInternalSession.m	Sat Jun 27 15:21:00 2020 +0200
     1.2 +++ b/pEpObjCAdapter/PEPInternalSession.m	Sat Jun 27 15:28:44 2020 +0200
     1.3 @@ -1095,6 +1095,15 @@
     1.4          *error = nil;
     1.5      }
     1.6  
     1.7 +    NSString *normalizedPassphrase = [passphrase precomposedStringWithCanonicalMapping];
     1.8 +    PEP_STATUS status = config_passphrase_for_new_keys(_session,
     1.9 +                                                       enable,
    1.10 +                                                       [normalizedPassphrase UTF8String]);
    1.11 +
    1.12 +    if ([NSError setError:error fromPEPStatus:status]) {
    1.13 +        return NO;
    1.14 +    }
    1.15 +
    1.16      return YES;
    1.17  }
    1.18