-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCommonModule.asn1
73 lines (63 loc) · 2.49 KB
/
CommonModule.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
CommonModule DEFINITIONS AUTOMATIC TAGS ::= BEGIN
EXPORTS ALL;
RoleType ::= ENUMERATED {root, targets, snapshot, timestamp}
-- String types.
Filename ::= VisibleString (SIZE(1..32))
-- No known path separator allowed in a strict filename.
StrictFilename ::= VisibleString (SIZE(1..32))
(PATTERN "[^/\\]+")
BitString ::= BIT STRING (SIZE(1..1024))
OctetString ::= OCTET STRING (SIZE(1..1024))
-- Adjust length of SEQUENCE OF to your needs.
Paths ::= SEQUENCE (SIZE(1..8)) OF Path
Path ::= VisibleString (SIZE(1..32))
(PATTERN "[\w\*\\/]+")
-- Adjust length of SEQUENCE OF to your needs.
URLs ::= SEQUENCE (SIZE(0..8)) OF URL
URL ::= VisibleString (SIZE(1..1024))
-- A generic identifier for vehicles, primaries, secondaries.
Identifier ::= VisibleString (SIZE(1..32))
Natural ::= INTEGER (0..MAX)
Positive ::= INTEGER (1..MAX)
Length ::= Positive
Threshold ::= Positive
Version ::= Positive
-- The date and time in UTC encoded as a UNIX timestamp.
UTCDateTime ::= Positive
BinaryData ::= CHOICE {
bitString BitString,
octetString OctetString
}
-- Adjust length of SEQUENCE OF to your needs.
Hashes ::= SEQUENCE (SIZE(1..8)) OF Hash
Hash ::= SEQUENCE {
function HashFunction,
digest BinaryData
}
HashFunction ::= ENUMERATED {sha224, sha256, sha384, sha512, sha512-224,
sha512-256, ...}
-- Adjust length of SEQUENCE OF to your needs.
Keyids ::= SEQUENCE (SIZE(1..8)) OF Keyid
-- Usually, a hash of a public key.
Keyid ::= BinaryData
-- Adjust length of SEQUENCE OF to your needs.
Signatures ::= SEQUENCE (SIZE(1..8)) OF Signature
Signature ::= SEQUENCE {
keyid Keyid,
method SignatureMethod,
-- For efficient checking, sign the hash of the message instead of the
-- message itself.
hash Hash,
-- The signature itself.
value BinaryData
}
SignatureMethod ::= ENUMERATED {rsassa-pss, ed25519, ...}
-- Adjust length of SEQUENCE OF to your needs.
PublicKeys ::= SEQUENCE (SIZE(1..8)) OF PublicKey
PublicKey ::= SEQUENCE {
publicKeyid Keyid,
publicKeyType PublicKeyType,
publicKeyValue BinaryData
}
PublicKeyType ::= ENUMERATED {rsa, ed25519, ...}
END