aboutsummaryrefslogtreecommitdiff
path: root/acse
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-10-15 17:21:06 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-10-15 17:21:06 +0200
commit3103c04c8d1a48370f950801a0533fe5f7578070 (patch)
tree0b38e6f2ea6a768f3f0a4d60264dee7e747dea3b /acse
parent5cc436168231d723793464bd2e770427d7d83df8 (diff)
Encapsulate
Diffstat (limited to 'acse')
-rw-r--r--acse/acse.go21
1 files changed, 10 insertions, 11 deletions
diff --git a/acse/acse.go b/acse/acse.go
index 5fb1786..1ec4e56 100644
--- a/acse/acse.go
+++ b/acse/acse.go
@@ -1,6 +1,9 @@
package acse
-import "github.com/dim13/asn1"
+import (
+ "dim13.org/asn1/csta"
+ "github.com/dim13/asn1"
+)
// 2.2.0.0.1
@@ -72,22 +75,18 @@ type NewDefinition struct {
CSTAVersion asn1.BitString
}
+var Version1 = asn1.BitString{Bytes: []byte{0x80}, BitLength: 1}
+
func Associate() ([]byte, error) {
aarq := AARQ{
- ProtocolVersion: asn1.BitString{
- Bytes: []byte{0x80},
- BitLength: 1,
- },
- ApplicationContextName: asn1.ObjectIdentifier([]int{1, 3, 12, 0, 218}),
+ ProtocolVersion: Version1,
+ ApplicationContextName: csta.CSTA,
UserInformation: UserInformation{
External{
- DirectReference: asn1.ObjectIdentifier([]int{1, 3, 12, 0, 285, 200}),
+ DirectReference: csta.OID,
Encoding: ACSEUserInformationForCSTA{
NewDefinition{
- CSTAVersion: asn1.BitString{
- Bytes: []byte{0x08, 0x00},
- BitLength: 16,
- },
+ CSTAVersion: csta.Version5,
},
},
},