IOSAD-172 Deliver engine session to the block IOSAD-172
authorDirk Zimmermann <dz@pep.security>
Sat, 27 Jun 2020 12:43:21 +0200
branchIOSAD-172
changeset 1500c5d63e15cba7
parent 1499 1f0a85d670dc
child 1501 391c6fd3ac7a
IOSAD-172 Deliver engine session to the block
pEpObjCAdapter/PEPInternalSession+PassphraseCache.h
pEpObjCAdapter/PEPInternalSession+PassphraseCache.m
     1.1 --- a/pEpObjCAdapter/PEPInternalSession+PassphraseCache.h	Sat Jun 27 12:09:58 2020 +0200
     1.2 +++ b/pEpObjCAdapter/PEPInternalSession+PassphraseCache.h	Sat Jun 27 12:43:21 2020 +0200
     1.3 @@ -21,7 +21,7 @@
     1.4  /// until it returns something else other than PEP_PASSPHRASE_REQUIRED
     1.5  /// or PEP_WRONG_PASSPHRASE, or there are no passwords anymore.
     1.6  /// @param block The status-returning block to execute against different passwords
     1.7 -- (PEP_STATUS)runWithPasswords:(PEP_STATUS (^)(void))block;
     1.8 +- (PEP_STATUS)runWithPasswords:(PEP_STATUS (^)(PEP_SESSION session))block;
     1.9  
    1.10  @end
    1.11  
     2.1 --- a/pEpObjCAdapter/PEPInternalSession+PassphraseCache.m	Sat Jun 27 12:09:58 2020 +0200
     2.2 +++ b/pEpObjCAdapter/PEPInternalSession+PassphraseCache.m	Sat Jun 27 12:43:21 2020 +0200
     2.3 @@ -14,7 +14,7 @@
     2.4  
     2.5  @implementation PEPInternalSession (PassphraseCache)
     2.6  
     2.7 -- (PEP_STATUS)runWithPasswords:(PEP_STATUS (^)(void))block
     2.8 +- (PEP_STATUS)runWithPasswords:(PEP_STATUS (^)(PEP_SESSION session))block
     2.9  {
    2.10      PEP_STATUS lastStatus = PEP_UNKNOWN_ERROR;
    2.11  
    2.12 @@ -26,7 +26,7 @@
    2.13              return status;
    2.14          }
    2.15  
    2.16 -        lastStatus = block();
    2.17 +        lastStatus = block(self.session);
    2.18  
    2.19          if (lastStatus != PEP_PASSPHRASE_REQUIRED && lastStatus != PEP_WRONG_PASSPHRASE) {
    2.20              return lastStatus;