Browse Source

IOSAD-172 configurePassphrase:error calls config_passphrase

IOSAD-172
Dirk Zimmermann 2 years ago
parent
commit
258dbc76e1
2 changed files with 8 additions and 1 deletions
  1. +6
    -0
      pEpObjCAdapter/PEPInternalSession.m
  2. +2
    -1
      pEpObjCAdapterFramework/PEPSessionProtocol.h

+ 6
- 0
pEpObjCAdapter/PEPInternalSession.m View File

@ -1085,6 +1085,12 @@ static NSUInteger s_passphraseMaxNumberOfCodePoints = 250;
[[PEPPassphraseCache sharedInstance] addPassphrase:normalizedPassphrase];
PEP_STATUS status = config_passphrase(_session, [normalizedPassphrase UTF8String]);
if ([NSError setError:error fromPEPStatusInternal:status]) {
return NO;
}
return YES;
}


+ 2
- 1
pEpObjCAdapterFramework/PEPSessionProtocol.h View File

@ -317,7 +317,8 @@ typedef NS_CLOSED_ENUM(int, PEPAdapterError) {
/// approximated by checking the string length.
/// If the passphrase exceeds this limit, the adapter throws PEPAdapterErrorPassphraseTooLong
/// with a domain of PEPObjCAdapterErrorDomain.
/// @Throws PEPAdapterErrorPassphraseTooLong (with a domain of PEPObjCAdapterErrorDomain).
/// @Throws PEPAdapterErrorPassphraseTooLong (with a domain of PEPObjCAdapterErrorDomain)
/// or PEPStatusOutOfMemory (with PEPObjCAdapterEngineStatusErrorDomain)
- (BOOL)configurePassphrase:(NSString * _Nonnull)passphrase
error:(NSError * _Nullable * _Nullable)error;


Loading…
Cancel
Save