aboutsummaryrefslogtreecommitdiff
path: root/ber/obj.go
diff options
context:
space:
mode:
Diffstat (limited to 'ber/obj.go')
-rw-r--r--ber/obj.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/ber/obj.go b/ber/obj.go
index 5482cd1..a03d198 100644
--- a/ber/obj.go
+++ b/ber/obj.go
@@ -1,6 +1,6 @@
package ber
-type Obj []int
+type OID []int
func base128(n int) (b []byte) {
if n == 0 {
@@ -25,7 +25,7 @@ func debase128(b []byte) int {
return 0
}
-func marshalObj(obj Obj) (b []byte) {
+func marshalOID(obj OID) (b []byte) {
if len(obj) < 2 || obj[0] > 2 {
return []byte{}
}
@@ -40,6 +40,11 @@ func marshalObj(obj Obj) (b []byte) {
return b
}
-func unmarshalObj(b []byte) Obj {
- return Obj{}
+func unmarshalOID(b []byte) OID {
+ return OID{}
+}
+
+func (o OID) Marshal() ([]byte, error) {
+ b := marshalOID(o)
+ return b, nil
}