mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 19:03:39 +00:00
Don't remote-encrypt key exchange messages
This commit is contained in:
parent
81107a98eb
commit
7090ca4a42
@ -40,11 +40,14 @@ public class SmsTransport {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void deliverSecureMessage(SmsMessageRecord message) throws UndeliverableMessageException {
|
private void deliverSecureMessage(SmsMessageRecord message) throws UndeliverableMessageException {
|
||||||
String encryptedMessage = getAsymmetricEncrypt(masterSecret, message.getBody().getBody(),
|
|
||||||
message.getIndividualRecipient());
|
|
||||||
|
|
||||||
OutgoingTextMessage transportMessage = OutgoingTextMessage.from(message).withBody(encryptedMessage);
|
|
||||||
MultipartSmsMessageHandler multipartMessageHandler = new MultipartSmsMessageHandler();
|
MultipartSmsMessageHandler multipartMessageHandler = new MultipartSmsMessageHandler();
|
||||||
|
OutgoingTextMessage transportMessage = OutgoingTextMessage.from(message);
|
||||||
|
|
||||||
|
if (message.isSecure()) {
|
||||||
|
String encryptedMessage = getAsymmetricEncrypt(masterSecret, message.getBody().getBody(),
|
||||||
|
message.getIndividualRecipient());
|
||||||
|
transportMessage = transportMessage.withBody(encryptedMessage);
|
||||||
|
}
|
||||||
|
|
||||||
ArrayList<String> messages = multipartMessageHandler.divideMessage(transportMessage);
|
ArrayList<String> messages = multipartMessageHandler.divideMessage(transportMessage);
|
||||||
ArrayList<PendingIntent> sentIntents = constructSentIntents(message.getId(), message.getType(), messages);
|
ArrayList<PendingIntent> sentIntents = constructSentIntents(message.getId(), message.getType(), messages);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user