Compare commits
1 Commits
master
...
charlesmch
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b84adc0967 |
@ -1,9 +1,5 @@
|
||||
//
|
||||
// PrekeyWhisperMessage.m
|
||||
// AxolotlKit
|
||||
//
|
||||
// Created by Frederic Jacobs on 23/07/14.
|
||||
// Copyright (c) 2014 Frederic Jacobs. All rights reserved.
|
||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import "PreKeyWhisperMessage.h"
|
||||
@ -123,18 +119,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
return CipherMessageType_Prekey;
|
||||
}
|
||||
|
||||
#pragma mark - Logging
|
||||
|
||||
+ (NSString *)logTag
|
||||
{
|
||||
return [NSString stringWithFormat:@"[%@]", self.class];
|
||||
}
|
||||
|
||||
- (NSString *)logTag
|
||||
{
|
||||
return self.class.logTag;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@ -130,7 +130,7 @@ const int kPreKeyOfLastResortId = 0xFFFFFF;
|
||||
protocolContext:protocolContext];
|
||||
if (previousIdentityExisted) {
|
||||
DDLogInfo(@"%@ PKBundle removing previous session states for changed identity for recipient:%@",
|
||||
self.tag,
|
||||
self.logTag,
|
||||
self.recipientId);
|
||||
[sessionRecord removePreviousSessionStates];
|
||||
}
|
||||
@ -195,7 +195,7 @@ const int kPreKeyOfLastResortId = 0xFFFFFF;
|
||||
if (message.prekeyID >= 0) {
|
||||
ourOneTimePreKey = [self.prekeyStore loadPreKey:message.prekeyID].keyPair;
|
||||
} else {
|
||||
DDLogWarn(@"%@ Processing PreKey message which had no one-time prekey.", self.tag);
|
||||
DDLogWarn(@"%@ Processing PreKey message which had no one-time prekey.", self.logTag);
|
||||
}
|
||||
|
||||
BobAxolotlParameters *params =
|
||||
@ -224,18 +224,6 @@ const int kPreKeyOfLastResortId = 0xFFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Logging
|
||||
|
||||
+ (NSString *)tag
|
||||
{
|
||||
return [NSString stringWithFormat:@"[%@]", self.class];
|
||||
}
|
||||
|
||||
- (NSString *)tag
|
||||
{
|
||||
return self.class.tag;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
//
|
||||
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Curve25519Kit/Curve25519.h>
|
||||
#import "SessionState.h"
|
||||
#import "ChainAndIndex.h"
|
||||
#import "ReceivingChain.h"
|
||||
#import "SendingChain.h"
|
||||
#import "ChainAndIndex.h"
|
||||
|
||||
#import <Curve25519Kit/Curve25519.h>
|
||||
|
||||
@implementation PendingPreKey
|
||||
|
||||
@ -192,7 +191,7 @@ static NSString* const kCoderPendingPrekey = @"kCoderPendingPrekey";
|
||||
|
||||
if ([self.receivingChains count] > 5) {
|
||||
DDLogInfo(
|
||||
@"%@ Trimming excessive receivingChain count: %lu", self.tag, (unsigned long)self.receivingChains.count);
|
||||
@"%@ Trimming excessive receivingChain count: %lu", self.logTag, (unsigned long)self.receivingChains.count);
|
||||
// We keep 5 receiving chains to be able to decrypt out of order messages.
|
||||
[self.receivingChains removeObjectAtIndex:0];
|
||||
}
|
||||
@ -298,16 +297,4 @@ static NSString* const kCoderPendingPrekey = @"kCoderPendingPrekey";
|
||||
self.pendingPreKey = nil;
|
||||
}
|
||||
|
||||
#pragma mark - Logging
|
||||
|
||||
+ (NSString *)tag
|
||||
{
|
||||
return [NSString stringWithFormat:@"[%@]", self.class];
|
||||
}
|
||||
|
||||
- (NSString *)tag
|
||||
{
|
||||
return self.class.tag;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user