2023-01-03 19:55:46 +00:00
|
|
|
// Copyright 2018 Signal Messenger, LLC
|
2021-07-20 20:18:35 +00:00
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2018-10-18 01:01:21 +00:00
|
|
|
package signalservice;
|
|
|
|
|
|
|
|
option java_package = "org.whispersystems.libsignal.protocol";
|
|
|
|
option java_outer_classname = "WhisperProtos";
|
|
|
|
|
|
|
|
message ServerCertificate {
|
|
|
|
message Certificate {
|
|
|
|
optional uint32 id = 1;
|
|
|
|
optional bytes key = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
optional bytes certificate = 1;
|
|
|
|
optional bytes signature = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SenderCertificate {
|
|
|
|
message Certificate {
|
2021-05-14 01:18:43 +00:00
|
|
|
optional string senderE164 = 1;
|
|
|
|
optional string senderUuid = 6;
|
|
|
|
optional uint32 senderDevice = 2;
|
|
|
|
optional fixed64 expires = 3;
|
|
|
|
optional bytes identityKey = 4;
|
|
|
|
optional ServerCertificate signer = 5;
|
2018-10-18 01:01:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
optional bytes certificate = 1;
|
|
|
|
optional bytes signature = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UnidentifiedSenderMessage {
|
|
|
|
|
|
|
|
message Message {
|
|
|
|
enum Type {
|
2021-05-14 01:18:43 +00:00
|
|
|
PREKEY_MESSAGE = 1;
|
|
|
|
MESSAGE = 2;
|
|
|
|
// Further cases should line up with Envelope.Type, even though old cases don't.
|
2021-07-20 20:18:35 +00:00
|
|
|
|
2021-05-14 01:18:43 +00:00
|
|
|
// Our parser does not handle reserved in enums: DESKTOP-1569
|
|
|
|
// reserved 3 to 6;
|
2021-07-20 20:18:35 +00:00
|
|
|
|
2021-05-14 01:18:43 +00:00
|
|
|
SENDERKEY_MESSAGE = 7;
|
2021-05-28 19:11:19 +00:00
|
|
|
PLAINTEXT_CONTENT = 8;
|
2021-05-14 01:18:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
enum ContentHint {
|
2021-06-08 21:51:58 +00:00
|
|
|
// Show an error immediately; it was important but we can't retry.
|
|
|
|
DEFAULT = 0;
|
2021-07-20 20:18:35 +00:00
|
|
|
|
2021-06-08 21:51:58 +00:00
|
|
|
// Sender will try to resend; delay any error UI if possible
|
|
|
|
RESENDABLE = 1;
|
2021-05-28 19:11:19 +00:00
|
|
|
|
2021-06-08 21:51:58 +00:00
|
|
|
// Don't show any error UI at all; this is something sent implicitly like a typing message or a receipt
|
|
|
|
IMPLICIT = 2;
|
2018-10-18 01:01:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
optional Type type = 1;
|
|
|
|
optional SenderCertificate senderCertificate = 2;
|
|
|
|
optional bytes content = 3;
|
2021-05-14 01:18:43 +00:00
|
|
|
optional ContentHint contentHint = 4;
|
|
|
|
optional bytes groupId = 5;
|
2018-10-18 01:01:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
optional bytes ephemeralPublic = 1;
|
|
|
|
optional bytes encryptedStatic = 2;
|
|
|
|
optional bytes encryptedMessage = 3;
|
2021-05-28 19:11:19 +00:00
|
|
|
}
|