p≡p engine fork for my own dirty testing of stuff
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

106 lines
3.9 KiB

-- This file is under BSD License 2.0
--
-- Sync protocol for p≡p
-- Copyright (c) 2021 p≡p foundation
--
-- Written by Hartmut Goebel
PEP-MESSAGE {
iso(1) org(3) dod(6) internet(1) private(4)
enterprise(1) pEp(47878) message(1)
}
DEFINITIONS
AUTOMATIC TAGS EXTENSIBILITY IMPLIED ::=
BEGIN
EXPORTS PEPMessage;
IMPORTS
PString, PStringList, Identity, IdentityList, StringPairList, Hash
FROM PEP { iso(1) org(3) dod(6) internet(1) private(4)
enterprise(1) pEp(47878) basic(0) };
MessageDirection ::= ENUMERATED {
incoming (0),
outgoing (1)
}
Blob ::= SEQUENCE {
value OCTET STRING (SIZE(0..102400000)), -- up to 100 MB
mime-type PString OPTIONAL,
filename PString OPTIONAL
}
BlobList ::= SEQUENCE OF Blob
/*
For the purposes of this profile, GeneralizedTime values MUST be
expressed in Coordinated Universal Time (UTC) and MUST include seconds
(i.e., times are YYYYMMDDHHMMSSZ), even where the number of seconds
is zero. GeneralizedTime values MUST NOT include fractional seconds.
To make this more explicit, the type-name "Timestamp" is used in this profile.
*/
Timestamp ::= GeneralizedTime
EncFormat ::= ENUMERATED {
none (0), -- message is not encrypted
inline (1), --
s-mime (2), -- RFC5751
pgp-mime (3), -- RFC3156
pEp (4), -- pEp encryption format
pgp-mime-outlook1 (5), -- Message B0rken by Outlook type 1
inline-ea (6)
-- not used on wire:
-- auto (255) -- -- figure out automatically where possible
}
PEPMessage ::= SEQUENCE {
direction MessageDirection OPTIONAL, -- used only in "inner" messages
id PString OPTIONAL, -- UTF-8 string of message ID
sent Timestamp OPTIONAL, -- when the message is sent
recv Timestamp OPTIONAL, -- when the message is received
from Identity, -- whom the message is from
-- At least one of to, cc must not be an empty list
-- FIXME: Can this be constrained?
to IdentityList OPTIONAL, -- whom the message is to
cc IdentityList OPTIONAL, -- whom a CC is being sent
bcc IdentityList OPTIONAL, -- whom a BCC is being sent
recv-by Identity OPTIONAL, -- via which identity the message
-- is received
reply-to IdentityList OPTIONAL, -- where a reply should go to
in-reply-to PStringList OPTIONAL, -- list of UTF-8 strings with
-- MessageIDs of refering messages
-- internal: refering_msg_ref
references PStringList OPTIONAL, -- list of UTF-8 strings with
-- references
-- internal: refered_by _message-ref-list
keywords PStringList OPTIONAL, -- list of UTF-8 strings with keywords
comments PString OPTIONAL, -- UTF-8 string with comments
opt-fields StringPairList OPTIONAL, -- optional fields
enc-format EncFormat DEFAULT none, -- format of encrypted data
sender-fpr Hash OPTIONAL, -- fingerprint of sending signer
-- At least one of shortmsg, longmsg, longmsg-formatted must be present
-- FIXME: Can this be constrained?
shortmsg PString OPTIONAL, -- UTF-8 string of short message
-- longmsg must only be used if implementation can handle dynamic allocation
longmsg UTF8String OPTIONAL, -- UTF-8 string of long message
-- (plain)
-- longmsg-formatted must only be used if implementation can handle
-- dynamic allocation
longmsg-formatted UTF8String OPTIONAL, -- UTF-8 string of long message
-- (formatted)
attachments BlobList OPTIONAL -- blobs with attachments
-- internal: rawmsg
}
END