-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathacsespec.py
124 lines (103 loc) · 8.02 KB
/
acsespec.py
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
from pyasn1.type import univ, namedtype, tag, constraint, namedval, char
class ProtocolVersion(univ.BitString):
pass
class ApplicationContextName(univ.Choice):
componentType=namedtype.NamedTypes(
namedtype.NamedType('',univ.ObjectIdentifier())
)
class APtitle(univ.Choice):
componentType=namedtype.NamedTypes(
namedtype.NamedType('AP-title-form1',univ.OctetString()),
namedtype.NamedType('AP-title-form2',univ.ObjectIdentifier())
)
class APInvocationIdentifier(univ.Integer):
pass
class AEInvocationIdentifier(univ.Integer):
pass
class Encoding(univ.Choice):
componentType=namedtype.NamedTypes(
namedtype.NamedType('single-ASN1-type',univ.OctetString().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,0))),
namedtype.NamedType('octet-aligned',univ.OctetString().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,1))),
namedtype.NamedType('arbitrary',univ.BitString().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,2)))
)
class External(univ.Sequence):
tagSet = univ.Sequence.tagSet.tagImplicitly(tag.Tag(tag.tagClassUniversal,tag.tagFormatConstructed,8))
componentType=namedtype.NamedTypes(
namedtype.OptionalNamedType('direct-reference',univ.ObjectIdentifier()),
namedtype.OptionalNamedType('indirect-reference',univ.Integer()),
namedtype.OptionalNamedType('data-value-descriptor',univ.OctetString().subtype(implicitTag=tag.Tag(tag.tagClassUniversal,tag.tagFormatSimple,7))),
namedtype.NamedType('encoding',Encoding()),
)
class AEQualifier(univ.Choice):
componentType=namedtype.NamedTypes(
namedtype.NamedType('AE-qualifier-form1',univ.OctetString()),
namedtype.NamedType('AE-qualifier-form2',univ.Integer()),
)
class ASCE_requirements(univ.BitString):
pass
class Mechanism_name(univ.ObjectIdentifier):
pass
class Authentication_value(univ.Choice):
pass
class Application_context_name_list(univ.SequenceOf):
componentType=ApplicationContextName()
class Implemation_Data(char.GraphicString):
pass
class Association_information(univ.SequenceOf):
componentType=External()
class Associate_result(univ.Integer):
pass
class Associate_source_diagnostic(univ.Choice):
componentType=namedtype.NamedTypes(
namedtype.NamedType('asce-service-user',univ.Integer().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,1))),
namedtype.NamedType('asce-service-provider',univ.Integer().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,2)))
)
class AARQ_apdu(univ.Sequence):
componentType=namedtype.NamedTypes(
namedtype.OptionalNamedType('protocol-version',univ.BitString().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,0))),
namedtype.OptionalNamedType('application-context-name',ApplicationContextName().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatConstructed,1))),
namedtype.OptionalNamedType('called-AP-title',APtitle().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple, 2))),
namedtype.OptionalNamedType('called-AE-qualifier',AEQualifier().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,3))),
namedtype.OptionalNamedType('called-AP-invocation-identifier',APInvocationIdentifier().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,4))),
namedtype.OptionalNamedType('called-AE-invocation-identifier',AEInvocationIdentifier().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,5))),
namedtype.OptionalNamedType('calling-AP-title',APtitle().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple, 6))),
namedtype.OptionalNamedType('calling-AE-qualifier',AEQualifier().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,7))),
namedtype.OptionalNamedType('calling-AP-invocation-identifier',APInvocationIdentifier().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,8))),
namedtype.OptionalNamedType('calling-AE-invocation-identifier',AEInvocationIdentifier().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,9))),
namedtype.OptionalNamedType('sender-acse-requirements',ASCE_requirements().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,10))),
namedtype.OptionalNamedType('mechanism-name',Mechanism_name().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,11))),
namedtype.OptionalNamedType('calling-authentication-value',Authentication_value().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,12))),
namedtype.OptionalNamedType('application-context-name-list',Application_context_name_list().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,13))),
namedtype.OptionalNamedType('implementation-information',Implemation_Data().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,29))),
namedtype.OptionalNamedType('user-information',Association_information().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatConstructed,30)))
)
tagSet = univ.Sequence.tagSet.tagImplicitly(tag.Tag(tag.tagClassApplication,tag.tagFormatConstructed,0))
class AARE_apdu(univ.Sequence):
componentType=namedtype.NamedTypes(
namedtype.NamedType('protocol-version',univ.BitString().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,0))),
namedtype.NamedType('application-context-name',ApplicationContextName().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatConstructed,1))),
namedtype.NamedType('result',Associate_result().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple, 2))),
namedtype.NamedType('result-source-diagnostic',Associate_source_diagnostic().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatConstructed, 3))),
namedtype.OptionalNamedType('called-AP-title',APtitle().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple, 4))),
namedtype.OptionalNamedType('called-AE-qualifier',AEQualifier().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,5))),
namedtype.OptionalNamedType('called-AP-invocation-identifier',APInvocationIdentifier().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,6))),
namedtype.OptionalNamedType('called-AE-invocation-identifier',AEInvocationIdentifier().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,7))),
namedtype.OptionalNamedType('sender-acse-requirements',ASCE_requirements().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,8))),
namedtype.OptionalNamedType('mechanism-name',Mechanism_name().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,9))),
namedtype.OptionalNamedType('calling-authentication-value',Authentication_value().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,10))),
namedtype.OptionalNamedType('application-context-name-list',Application_context_name_list().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,11))),
namedtype.OptionalNamedType('implementation-information',Implemation_Data().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,29))),
namedtype.OptionalNamedType('user-information',Association_information().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatConstructed,30)))
)
tagSet = univ.Sequence.tagSet.tagImplicitly(tag.Tag(tag.tagClassApplication,tag.tagFormatConstructed,1))
class ABRT_diagnostic(univ.Enumerated):
pass
class ABRT_source(univ.Integer):
pass
class ABRT_apdu(univ.Sequence):
componentType=namedtype.NamedTypes(
namedtype.NamedType('abort-source',ABRT_source().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,0))),
namedtype.OptionalNamedType('abort-diagnostic',ABRT_diagnostic().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatSimple,1))),
namedtype.OptionalNamedType('user-information',Association_information().subtype(implicitTag=tag.Tag(tag.tagClassContext,tag.tagFormatConstructed,30)))
)
tagSet = univ.Sequence.tagSet.tagImplicitly(tag.Tag(tag.tagClassApplication,tag.tagFormatConstructed,4))