IOS-2325 Decorate set_own_key IOSAD-178
authorDirk Zimmermann <dz@pep.security>
Mon, 20 Jul 2020 17:00:22 +0200
branchIOSAD-178
changeset 1845143952e8d637
parent 1844 e644bc06029d
child 1846 adff3793d56e
IOS-2325 Decorate set_own_key
pEpObjCAdapter/PEPInternalSession.m
     1.1 --- a/pEpObjCAdapter/PEPInternalSession.m	Mon Jul 20 17:00:22 2020 +0200
     1.2 +++ b/pEpObjCAdapter/PEPInternalSession.m	Mon Jul 20 17:00:22 2020 +0200
     1.3 @@ -977,9 +977,13 @@
     1.4              error:(NSError * _Nullable * _Nullable)error
     1.5  {
     1.6      pEp_identity *ident = PEP_identityToStruct(identity);
     1.7 -    PEPStatus status = (PEPStatus) set_own_key(self.session, ident,
     1.8 -                                               [[fingerprint precomposedStringWithCanonicalMapping]
     1.9 -                                                UTF8String]);
    1.10 +
    1.11 +    PEPStatus status = (PEPStatus) [self runWithPasswords:^PEP_STATUS(PEP_SESSION session) {
    1.12 +        return set_own_key(session, ident,
    1.13 +                           [[fingerprint precomposedStringWithCanonicalMapping]
    1.14 +                            UTF8String]);
    1.15 +    }];
    1.16 +
    1.17      free_identity(ident);
    1.18  
    1.19      if ([NSError setError:error fromPEPStatus:status]) {