-
Notifications
You must be signed in to change notification settings - Fork 4
/
CHAT.asn1
257 lines (219 loc) · 7.29 KB
/
CHAT.asn1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
-- "https://tonpa.guru/stream/2023/2023-08-07 CHAT ASN.1.htm"
CHAT DEFINITIONS IMPLICIT TAGS ::= BEGIN
IO ::= SEQUENCE { data UniversalString, code UniversalString }
OK ::= SEQUENCE { data UniversalString }
ERROR ::= SEQUENCE { code UniversalString }
P2P ::= SEQUENCE { from OCTET STRING, to OCTET STRING }
MUC ::= SEQUENCE { room OCTET STRING }
Feature ::= SEQUENCE {
id OCTET STRING,
key OCTET STRING,
value OCTET STRING,
group OCTET STRING }
ServiceType ::= ENUMERATED {
synrc (0),
aws (1),
gcp (2),
azure (3) }
ServiceStatus ::= ENUMERATED {
verified (0),
added (1),
add (2),
remove (3) }
Service ::= SEQUENCE {
id OCTET STRING,
type ServiceType,
data OCTET STRING,
login OCTET STRING,
password OCTET STRING,
expiration INTEGER,
status ServiceStatus }
Register ::= SEQUENCE {
nickname OCTET STRING,
csr OCTET STRING,
password OCTET STRING }
PresenceType ::= ENUMERATED { offline (1), online (2) }
Presence ::= SEQUENCE { nickname OCTET STRING, status PresenceType }
ContactStatus ::= ENUMERATED {
request (1),
authorization (2),
ignore (3),
internal (4),
friend (5),
lastmsg (6),
ban (7),
banned (8),
deleted (9),
nonexised (10) }
Contact ::= SEQUENCE {
nickname OCTET STRING,
avatar OCTET STRING,
names SEQUENCE OF name OCTET STRING,
phone OCTET STRING,
surnames SEQUENCE OF name OCTET STRING,
lastmsg Message,
presence PresenceType,
update INTEGER,
created INTEGER,
settings SEQUENCE OF feature Feature,
services SEQUENCE OF service Service,
status ContactStatus }
RosterStatus ::= ENUMERATED {
get (1), create (2), del (3), remove (4), nick (5), search (6),
contact (7), add (8), update (9), list (10), patch (11), lastmsg (12) }
Roster ::= SEQUENCE {
id OCTET STRING,
nickname OCTET STRING,
update INTEGER,
contacts SEQUENCE OF contact Contact,
topics SEQUENCE OF room Room,
status RosterStatus }
MessageType ::= ENUMERATED { sys (1), reply (2), forward (3), read (4), edited (5) }
MessageStatus ::= ENUMERATED { async (1), delete (2), clear (3), update (4), edit (5) }
MessageFeed ::= CHOICE { p2p [0] P2P, muc [1] MUC }
CHATString ::= OCTET STRING
Message ::= SEQUENCE {
id CHATString,
feed MessageFeed,
signature CHATString,
from CHATString,
to CHATString,
created INTEGER,
files SEQUENCE OF file FileDesc,
type MessageType,
link CHOICE { empty [1] NULL, message [2] Message },
seenby CHATString,
repliedby CHATString,
mentioned SEQUENCE OF name CHATString,
status MessageStatus DEFAULT clear }
MemberStatus ::= ENUMERATED { admin (1), member (2), removed (3), patch (4), owner (5) }
Member ::= SEQUENCE {
id INTEGER,
feed CHOICE { p2p [0] P2P, muc [1] MUC },
feeds SEQUENCE OF feed OCTET STRING,
phone OCTET STRING,
avatar OCTET STRING,
names SEQUENCE OF name OCTET STRING,
surnames SEQUENCE OF name OCTET STRING,
alias OCTET STRING,
update INTEGER,
settings SEQUENCE OF feature Feature,
services SEQUENCE OF servic Service,
presence PresenceType,
status MemberStatus }
RoomType ::= ENUMERATED { group (1), channel (2), call (3) }
RoomStatus ::= ENUMERATED {
create (1), leave (2), add (3), remove (4), removed (5),
join (6), joined (7), info (8), patch (9), get (10),
delete (11), lastmsg (12), mute (13), unmute (14) }
Room ::= SEQUENCE {
id OCTET STRING,
name OCTET STRING,
links SEQUENCE OF link OCTET STRING,
description OCTET STRING,
settings SEQUENCE OF feature Feature,
members SEQUENCE OF member Member,
admins SEQUENCE OF member Member,
data SEQUENCE OF file FileDesc,
type RoomType,
tos OCTET STRING,
tosupdate INTEGER,
unread INTEGER,
mentions SEQUENCE OF contact INTEGER,
lastmsg Message,
update INTEGER,
created INTEGER,
status RoomStatus }
Server ::= SEQUENCE { service OCTET STRING, port INTEGER, host OCTET STRING }
Profile ::= SEQUENCE {
nickname OCTET STRING,
phone OCTET STRING,
session OCTET STRING,
chats SEQUENCE OF contact Contact,
contacts SEQUENCE OF contact Contact,
keys SEQUENCE OF key OCTET STRING,
servers SEQUENCE OF server Server,
settings SEQUENCE OF feature Feature,
update INTEGER,
status INTEGER,
roster Roster }
OS ::= ENUMERATED { apple (1), microsoft (2), google (3), ericsson (4) }
AuthType ::= ENUMERATED { reg (1), auth (2), forget (3), renew (4) }
Ack ::= SEQUENCE { table OCTET STRING, id OCTET STRING }
FileDesc ::= SEQUENCE {
id OCTET STRING,
mime OCTET STRING,
payload ANY,
parentid OCTET STRING,
data SEQUENCE OF feature Feature }
Auth ::= SEQUENCE {
session OCTET STRING,
type AuthType,
cert OCTET STRING,
challange OCTET STRING,
push OCTET STRING,
os OS,
nickname OCTET STRING,
settings SEQUENCE OF feature Feature,
token OCTET STRING,
devkey OCTET STRING,
phone OCTET STRING }
SearchStatus ::= ENUMERATED { ok (0) }
Criteria ::= ENUMERATED {
equal (0), notequal (1), like (2) }
Scope ::= ENUMERATED {
profile (0), folder (1), contact (2),
member (3), room (4), chat (5), message (6) }
Search ::= SEQUENCE {
dn OCTET STRING,
id OCTET STRING,
field OCTET STRING,
value OCTET STRING,
criteria Criteria,
type Scope,
status SearchStatus }
Typing ::= SEQUENCE {
session OCTET STRING,
nickname OCTET STRING,
comments SEQUENCE OF comment OCTET STRING }
Friendship ::= ENUMERATED {
request (1), confirm (2), update (3), ignore (4),
ban (5), unban (6) }
Friend ::= SEQUENCE {
nickname OCTET STRING,
friend OCTET STRING,
type Friendship }
HistoryStatus ::= ENUMERATED {
updated (1), get (2), update (3), lastloaded (4),
lastmsg (5), getreply (6), doubleget (7),
delete (8), image (9), video (10), file (11),
link (12), audio (13), contact (14), location (15), text (16) }
History ::= SEQUENCE {
nickname OCTET STRING,
feed CHOICE { p2p [0] P2P, muc [1] MUC },
size INTEGER,
entity INTEGER,
data SEQUENCE OF message Message,
roster UniversalString,
status HistoryStatus }
CHATProtocol ::= CHOICE {
register [0] Register,
auth [1] Auth,
feature [2] Feature,
service [3] Service,
message [4] Message,
profile [5] Profile,
room [6] Room,
member [7] Member,
search [8] Search,
file [9] FileDesc,
typing [10] Typing,
friend [11] Friend,
presence [12] Presence,
history [13] History,
roster [14] Roster }
CHATMessage ::= SEQUENCE {
no INTEGER,
headers SEQUENCE OF header OCTET STRING,
body CHATProtocol }
END