IOSAD-172 Dummy for configurePassphraseForNewKeys:enable:error IOSAD-172
authorDirk Zimmermann <dz@pep.security>
Sat, 27 Jun 2020 15:15:37 +0200
branchIOSAD-172
changeset 15172aa3f8ebb4d6
parent 1516 891baa5770c5
child 1518 9b72d301ab28
IOSAD-172 Dummy for configurePassphraseForNewKeys:enable:error
pEpObjCAdapter/PEPInternalSession.m
pEpObjCAdapterFramework/PEPSessionProtocol.h
     1.1 --- a/pEpObjCAdapter/PEPInternalSession.m	Sat Jun 27 15:02:27 2020 +0200
     1.2 +++ b/pEpObjCAdapter/PEPInternalSession.m	Sat Jun 27 15:15:37 2020 +0200
     1.3 @@ -1088,4 +1088,14 @@
     1.4      return YES;
     1.5  }
     1.6  
     1.7 +- (BOOL)configurePassphraseForNewKeys:(NSString * _Nullable)passphrase
     1.8 +                               enable:(BOOL)enable error:(NSError * _Nullable * _Nullable)error
     1.9 +{
    1.10 +    if (error) {
    1.11 +        *error = nil;
    1.12 +    }
    1.13 +
    1.14 +    return YES;
    1.15 +}
    1.16 +
    1.17  @end
     2.1 --- a/pEpObjCAdapterFramework/PEPSessionProtocol.h	Sat Jun 27 15:02:27 2020 +0200
     2.2 +++ b/pEpObjCAdapterFramework/PEPSessionProtocol.h	Sat Jun 27 15:15:37 2020 +0200
     2.3 @@ -321,4 +321,19 @@
     2.4  - (BOOL)configurePassphrase:(NSString * _Nonnull)passphrase
     2.5                        error:(NSError * _Nullable * _Nullable)error;
     2.6  
     2.7 +/// Sets a passphrase (with a maximum of 250 code points) for
     2.8 +/// (own) secret keys generated from now on.
     2.9 +///
    2.10 +/// For setting a passphrase, `enable` must be set to `YES`,
    2.11 +/// in which case the `passphrase` should contain an actual passphrase.
    2.12 +/// A `nil` `passphrase` with `enable` set to `YES` is undefined.
    2.13 +/// The passphrase can be unset by setting `enable` to `NO`
    2.14 +/// (with or without passphrase, this gets (assumedly)
    2.15 +/// ignored in this case, but has to be verified).
    2.16 +/// Uses the engine's `config_passphrase_for_new_keys`.
    2.17 +/// @Throws PEPAdapterErrorPassphraseTooLong (with a domain of PEPObjCAdapterErrorDomain)
    2.18 +/// or PEPStatusOutOfMemory (with PEPObjCAdapterEngineStatusErrorDomain)
    2.19 +- (BOOL)configurePassphraseForNewKeys:(NSString * _Nullable)passphrase
    2.20 +                               enable:(BOOL)enable error:(NSError * _Nullable * _Nullable)error;
    2.21 +
    2.22  @end