@@ -112,7 +112,7 @@ - (instancetype)initWithSessionStore:(id<SessionStore>)sessionStore
112
112
recipientId: self .recipientId
113
113
direction: TSMessageDirectionOutgoing
114
114
protocolContext: protocolContext]) {
115
- DDLogWarn (
115
+ OWSLogWarn (
116
116
@" %@ Previously known identity key for while encrypting for recipient: %@ " , self.tag , self.recipientId );
117
117
@throw [NSException exceptionWithName: UntrustedIdentityKeyException
118
118
reason: @" There is a previously known identity key."
@@ -140,7 +140,8 @@ - (instancetype)initWithSessionStore:(id<SessionStore>)sessionStore
140
140
PendingPreKey *items = [sessionState unacknowledgedPreKeyMessageItems ];
141
141
int localRegistrationId = [sessionState localRegistrationId ];
142
142
143
- DDLogInfo (@" Building PreKeyWhisperMessage for: %@ with preKeyId: %d " , self.recipientId , items.preKeyId );
143
+ OWSLogInfo (@" Building PreKeyWhisperMessage for: %@ .%lu with preKeyId: %d " ,
144
+ self.recipientId , (unsigned long ) self.deviceId , items.preKeyId );
144
145
145
146
cipherMessage =
146
147
[[PreKeyWhisperMessage alloc ] init_throws_withWhisperMessage: cipherMessage
@@ -240,7 +241,7 @@ - (NSData *)throws_decryptWhisperMessage:(WhisperMessage *)whisperMessage protoc
240
241
recipientId: self .recipientId
241
242
direction: TSMessageDirectionIncoming
242
243
protocolContext: protocolContext]) {
243
- DDLogWarn (
244
+ OWSLogWarn (
244
245
@" %@ Previously known identity key for while decrypting from recipient: %@ " , self.tag , self.recipientId );
245
246
@throw [NSException exceptionWithName: UntrustedIdentityKeyException
246
247
reason: @" There is a previously known identity key."
@@ -272,7 +273,7 @@ - (NSData *)throws_decryptWithSessionRecord:(SessionRecord *)sessionRecord
272
273
NSData *decryptedData = [self throws_decryptWithSessionState: sessionState
273
274
whisperMessage: whisperMessage
274
275
protocolContext: protocolContext];
275
- DDLogDebug (@" %@ successfully decrypted with current session state: %@ " , self.tag , sessionState);
276
+ OWSLogDebug (@" %@ successfully decrypted with current session state: %@ " , self.tag , sessionState);
276
277
return decryptedData;
277
278
}
278
279
@catch (NSException *exception ) {
@@ -293,7 +294,7 @@ - (NSData *)throws_decryptWithSessionRecord:(SessionRecord *)sessionRecord
293
294
decryptedData = [self throws_decryptWithSessionState: previousState
294
295
whisperMessage: whisperMessage
295
296
protocolContext: protocolContext];
296
- DDLogInfo (@" %@ successfully decrypted with PREVIOUS session state: %@ " , self.tag , previousState);
297
+ OWSLogInfo (@" %@ successfully decrypted with PREVIOUS session state: %@ " , self.tag , previousState);
297
298
OWSAssert (decryptedData != nil );
298
299
stateToPromoteIdx = idx;
299
300
*stop = YES ;
@@ -305,7 +306,7 @@ - (NSData *)throws_decryptWithSessionRecord:(SessionRecord *)sessionRecord
305
306
if (decryptedData) {
306
307
SessionState *sessionStateToPromote = [sessionRecord previousSessionStates ][stateToPromoteIdx];
307
308
OWSAssert (sessionStateToPromote != nil );
308
- DDLogInfo (@" %@ promoting session: %@ " , self.tag , sessionStateToPromote);
309
+ OWSLogInfo (@" %@ promoting session: %@ " , self.tag , sessionStateToPromote);
309
310
[[sessionRecord previousSessionStates ] removeObjectAtIndex: stateToPromoteIdx];
310
311
[sessionRecord promoteState: sessionStateToPromote];
311
312
@@ -314,7 +315,7 @@ - (NSData *)throws_decryptWithSessionRecord:(SessionRecord *)sessionRecord
314
315
315
316
BOOL containsActiveSession =
316
317
[self .sessionStore containsSession: self .recipientId deviceId: self .deviceId protocolContext: protocolContext];
317
- DDLogError (@" %@ No valid session for recipient: %@ .%lu containsActiveSession: %@ , previousStates: %lu " ,
318
+ OWSLogError (@" %@ No valid session for recipient: %@ .%lu containsActiveSession: %@ , previousStates: %lu " ,
318
319
self.tag ,
319
320
self.recipientId ,
320
321
(unsigned long ) self.deviceId ,
@@ -386,10 +387,10 @@ - (ChainKey *)throws_getOrCreateChainKeys:(SessionState *)sessionState theirEphe
386
387
387
388
@try {
388
389
if ([sessionState hasReceiverChain: theirEphemeral]) {
389
- DDLogInfo (@" %@ %@ .%d has existing receiver chain." , self.tag , self.recipientId , self.deviceId );
390
+ OWSLogInfo (@" %@ %@ .%d has existing receiver chain." , self.tag , self.recipientId , self.deviceId );
390
391
return [sessionState receiverChainKey: theirEphemeral];
391
392
} else {
392
- DDLogInfo (@" %@ %@ .%d creating new chains." , self.tag , self.recipientId , self.deviceId );
393
+ OWSLogInfo (@" %@ %@ .%d creating new chains." , self.tag , self.recipientId , self.deviceId );
393
394
RootKey *rootKey = [sessionState rootKey ];
394
395
OWSAssert (rootKey.keyData .length == 32 );
395
396
0 commit comments