Browse Source

IOSAD-225 Make the inner session "rating-free"

IOSAD-225
Dirk Zimmermann 9 months ago
parent
commit
3128bba67c
3 changed files with 1 additions and 13 deletions
  1. +0
    -1
      pEpObjCAdapter/PEPInternalSession.h
  2. +0
    -9
      pEpObjCAdapter/PEPInternalSession.m
  3. +1
    -3
      pEpObjCAdapter/PEPSession.m

+ 0
- 1
pEpObjCAdapter/PEPInternalSession.h View File

@ -48,7 +48,6 @@
/** Decrypt a message */
- (PEPMessage * _Nullable)decryptMessage:(PEPMessage * _Nonnull)message
flags:(PEPDecryptFlags * _Nullable)flags
rating:(PEPRating * _Nullable)rating
extraKeys:(PEPStringList * _Nullable * _Nullable)extraKeys
status:(PEPStatus * _Nullable)status
error:(NSError * _Nullable * _Nullable)error;


+ 0
- 9
pEpObjCAdapter/PEPInternalSession.m View File

@ -86,15 +86,10 @@ void decryptMessageFree(message *src, message *dst, stringlist_t *extraKeys)
- (PEPMessage * _Nullable)decryptMessage:(PEPMessage * _Nonnull)theMessage
flags:(PEPDecryptFlags * _Nullable)flags
rating:(PEPRating * _Nullable)rating
extraKeys:(PEPStringList * _Nullable * _Nullable)extraKeys
status:(PEPStatus * _Nullable)status
error:(NSError * _Nullable * _Nullable)error
{
if (rating) {
*rating = PEPRatingUndefined;
}
message *_src = [PEPObjCTypeConversionUtil structFromPEPMessage:theMessage];
__block message *_dst = NULL;
__block stringlist_t *theKeys = NULL;
@ -150,10 +145,6 @@ void decryptMessageFree(message *src, message *dst, stringlist_t *extraKeys)
decryptMessageFree(_src, _dst, theKeys);
if (rating) {
*rating = internalRating;
}
return dst_;
}


+ 1
- 3
pEpObjCAdapter/PEPSession.m View File

@ -47,21 +47,19 @@ static dispatch_queue_t queue;
PEPMessage *theMessage = [[PEPMessage alloc] initWithMessage:message];
PEPDecryptFlags theFlags = flags;
PEPRating theRating;
PEPStringList *theExtraKeys = extraKeys;
PEPStatus status;
NSError *error = nil;
PEPMessage *newMessage = [[PEPSessionProvider session] decryptMessage:theMessage
flags:&theFlags
rating:&theRating
extraKeys:&theExtraKeys
status:&status
error:&error];
if (newMessage) {
// See IOS-2414 for details
BOOL isFormerlyEncryptedReuploadedMessage = (status == PEPStatusUnencrypted) && theRating >= PEPRatingUnreliable;
BOOL isFormerlyEncryptedReuploadedMessage = (status == PEPStatusUnencrypted) && newMessage.rating >= PEPRatingUnreliable;
successCallback(theMessage,
newMessage,
theExtraKeys,


Loading…
Cancel
Save