summaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/gopkg.in/asn1-ber.v1
diff options
context:
space:
mode:
Diffstat (limited to 'Godeps/_workspace/src/gopkg.in/asn1-ber.v1')
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/.travis.yml15
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/LICENSE27
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/README.md24
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/ber.go504
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/content_int.go25
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/header.go29
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/identifier.go103
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/length.go71
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc1.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc10.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc11.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc12.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc13.berbin11 -> 0 bytes
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc14.berbin7 -> 0 bytes
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc15.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc16.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc17.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc18.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc19.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc2.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc20.berbin11 -> 0 bytes
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc21.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc22.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc23.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc24.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc25.berbin5 -> 0 bytes
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc26.berbin5 -> 0 bytes
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc27.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc28.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc29.berbin3 -> 0 bytes
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc3.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc30.berbin5 -> 0 bytes
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc31.berbin4 -> 0 bytes
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc32.berbin2 -> 0 bytes
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc33.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc34.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc35.berbin16 -> 0 bytes
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc36.berbin20 -> 0 bytes
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc37.berbin14 -> 0 bytes
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc38.berbin16 -> 0 bytes
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc39.berbin2 -> 0 bytes
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc4.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc40.berbin2 -> 0 bytes
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc41.berbin16 -> 0 bytes
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc42.berbin14 -> 0 bytes
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc43.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc44.berbin2 -> 0 bytes
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc45.berbin2 -> 0 bytes
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc46.berbin11 -> 0 bytes
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc47.berbin16 -> 0 bytes
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc48.berbin16 -> 0 bytes
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc5.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc6.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc7.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc8.berbin5 -> 0 bytes
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc9.ber1
-rw-r--r--Godeps/_workspace/src/gopkg.in/asn1-ber.v1/util.go24
57 files changed, 0 insertions, 847 deletions
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/.travis.yml b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/.travis.yml
deleted file mode 100644
index 44aa48b87..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/.travis.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-language: go
-go:
- - 1.2
- - 1.3
- - 1.4
- - 1.5
- - tip
-go_import_path: gopkg.in/asn-ber.v1
-install:
- - go list -f '{{range .Imports}}{{.}} {{end}}' ./... | xargs go get -v
- - go list -f '{{range .TestImports}}{{.}} {{end}}' ./... | xargs go get -v
- - go get code.google.com/p/go.tools/cmd/cover || go get golang.org/x/tools/cmd/cover
- - go build -v ./...
-script:
- - go test -v -cover ./...
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/LICENSE b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/LICENSE
deleted file mode 100644
index 744875676..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2012 The Go Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/README.md b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/README.md
deleted file mode 100644
index e3a9560d6..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/README.md
+++ /dev/null
@@ -1,24 +0,0 @@
-[![GoDoc](https://godoc.org/gopkg.in/asn1-ber.v1?status.svg)](https://godoc.org/gopkg.in/asn1-ber.v1) [![Build Status](https://travis-ci.org/go-asn1-ber/asn1-ber.svg)](https://travis-ci.org/go-asn1-ber/asn1-ber)
-
-
-ASN1 BER Encoding / Decoding Library for the GO programming language.
----------------------------------------------------------------------
-
-Required libraries:
- None
-
-Working:
- Very basic encoding / decoding needed for LDAP protocol
-
-Tests Implemented:
- A few
-
-TODO:
- Fix all encoding / decoding to conform to ASN1 BER spec
- Implement Tests / Benchmarks
-
----
-
-The Go gopher was designed by Renee French. (http://reneefrench.blogspot.com/)
-The design is licensed under the Creative Commons 3.0 Attributions license.
-Read this article for more details: http://blog.golang.org/gopher
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/ber.go b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/ber.go
deleted file mode 100644
index 25cc921be..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/ber.go
+++ /dev/null
@@ -1,504 +0,0 @@
-package ber
-
-import (
- "bytes"
- "errors"
- "fmt"
- "io"
- "os"
- "reflect"
-)
-
-type Packet struct {
- Identifier
- Value interface{}
- ByteValue []byte
- Data *bytes.Buffer
- Children []*Packet
- Description string
-}
-
-type Identifier struct {
- ClassType Class
- TagType Type
- Tag Tag
-}
-
-type Tag uint64
-
-const (
- TagEOC Tag = 0x00
- TagBoolean Tag = 0x01
- TagInteger Tag = 0x02
- TagBitString Tag = 0x03
- TagOctetString Tag = 0x04
- TagNULL Tag = 0x05
- TagObjectIdentifier Tag = 0x06
- TagObjectDescriptor Tag = 0x07
- TagExternal Tag = 0x08
- TagRealFloat Tag = 0x09
- TagEnumerated Tag = 0x0a
- TagEmbeddedPDV Tag = 0x0b
- TagUTF8String Tag = 0x0c
- TagRelativeOID Tag = 0x0d
- TagSequence Tag = 0x10
- TagSet Tag = 0x11
- TagNumericString Tag = 0x12
- TagPrintableString Tag = 0x13
- TagT61String Tag = 0x14
- TagVideotexString Tag = 0x15
- TagIA5String Tag = 0x16
- TagUTCTime Tag = 0x17
- TagGeneralizedTime Tag = 0x18
- TagGraphicString Tag = 0x19
- TagVisibleString Tag = 0x1a
- TagGeneralString Tag = 0x1b
- TagUniversalString Tag = 0x1c
- TagCharacterString Tag = 0x1d
- TagBMPString Tag = 0x1e
- TagBitmask Tag = 0x1f // xxx11111b
-
- // HighTag indicates the start of a high-tag byte sequence
- HighTag Tag = 0x1f // xxx11111b
- // HighTagContinueBitmask indicates the high-tag byte sequence should continue
- HighTagContinueBitmask Tag = 0x80 // 10000000b
- // HighTagValueBitmask obtains the tag value from a high-tag byte sequence byte
- HighTagValueBitmask Tag = 0x7f // 01111111b
-)
-
-const (
- // LengthLongFormBitmask is the mask to apply to the length byte to see if a long-form byte sequence is used
- LengthLongFormBitmask = 0x80
- // LengthValueBitmask is the mask to apply to the length byte to get the number of bytes in the long-form byte sequence
- LengthValueBitmask = 0x7f
-
- // LengthIndefinite is returned from readLength to indicate an indefinite length
- LengthIndefinite = -1
-)
-
-var tagMap = map[Tag]string{
- TagEOC: "EOC (End-of-Content)",
- TagBoolean: "Boolean",
- TagInteger: "Integer",
- TagBitString: "Bit String",
- TagOctetString: "Octet String",
- TagNULL: "NULL",
- TagObjectIdentifier: "Object Identifier",
- TagObjectDescriptor: "Object Descriptor",
- TagExternal: "External",
- TagRealFloat: "Real (float)",
- TagEnumerated: "Enumerated",
- TagEmbeddedPDV: "Embedded PDV",
- TagUTF8String: "UTF8 String",
- TagRelativeOID: "Relative-OID",
- TagSequence: "Sequence and Sequence of",
- TagSet: "Set and Set OF",
- TagNumericString: "Numeric String",
- TagPrintableString: "Printable String",
- TagT61String: "T61 String",
- TagVideotexString: "Videotex String",
- TagIA5String: "IA5 String",
- TagUTCTime: "UTC Time",
- TagGeneralizedTime: "Generalized Time",
- TagGraphicString: "Graphic String",
- TagVisibleString: "Visible String",
- TagGeneralString: "General String",
- TagUniversalString: "Universal String",
- TagCharacterString: "Character String",
- TagBMPString: "BMP String",
-}
-
-type Class uint8
-
-const (
- ClassUniversal Class = 0 // 00xxxxxxb
- ClassApplication Class = 64 // 01xxxxxxb
- ClassContext Class = 128 // 10xxxxxxb
- ClassPrivate Class = 192 // 11xxxxxxb
- ClassBitmask Class = 192 // 11xxxxxxb
-)
-
-var ClassMap = map[Class]string{
- ClassUniversal: "Universal",
- ClassApplication: "Application",
- ClassContext: "Context",
- ClassPrivate: "Private",
-}
-
-type Type uint8
-
-const (
- TypePrimitive Type = 0 // xx0xxxxxb
- TypeConstructed Type = 32 // xx1xxxxxb
- TypeBitmask Type = 32 // xx1xxxxxb
-)
-
-var TypeMap = map[Type]string{
- TypePrimitive: "Primitive",
- TypeConstructed: "Constructed",
-}
-
-var Debug bool = false
-
-func PrintBytes(out io.Writer, buf []byte, indent string) {
- data_lines := make([]string, (len(buf)/30)+1)
- num_lines := make([]string, (len(buf)/30)+1)
-
- for i, b := range buf {
- data_lines[i/30] += fmt.Sprintf("%02x ", b)
- num_lines[i/30] += fmt.Sprintf("%02d ", (i+1)%100)
- }
-
- for i := 0; i < len(data_lines); i++ {
- out.Write([]byte(indent + data_lines[i] + "\n"))
- out.Write([]byte(indent + num_lines[i] + "\n\n"))
- }
-}
-
-func PrintPacket(p *Packet) {
- printPacket(os.Stdout, p, 0, false)
-}
-
-func printPacket(out io.Writer, p *Packet, indent int, printBytes bool) {
- indent_str := ""
-
- for len(indent_str) != indent {
- indent_str += " "
- }
-
- class_str := ClassMap[p.ClassType]
-
- tagtype_str := TypeMap[p.TagType]
-
- tag_str := fmt.Sprintf("0x%02X", p.Tag)
-
- if p.ClassType == ClassUniversal {
- tag_str = tagMap[p.Tag]
- }
-
- value := fmt.Sprint(p.Value)
- description := ""
-
- if p.Description != "" {
- description = p.Description + ": "
- }
-
- fmt.Fprintf(out, "%s%s(%s, %s, %s) Len=%d %q\n", indent_str, description, class_str, tagtype_str, tag_str, p.Data.Len(), value)
-
- if printBytes {
- PrintBytes(out, p.Bytes(), indent_str)
- }
-
- for _, child := range p.Children {
- printPacket(out, child, indent+1, printBytes)
- }
-}
-
-// ReadPacket reads a single Packet from the reader
-func ReadPacket(reader io.Reader) (*Packet, error) {
- p, _, err := readPacket(reader)
- if err != nil {
- return nil, err
- }
- return p, nil
-}
-
-func DecodeString(data []byte) string {
- return string(data)
-}
-
-func parseInt64(bytes []byte) (ret int64, err error) {
- if len(bytes) > 8 {
- // We'll overflow an int64 in this case.
- err = fmt.Errorf("integer too large")
- return
- }
- for bytesRead := 0; bytesRead < len(bytes); bytesRead++ {
- ret <<= 8
- ret |= int64(bytes[bytesRead])
- }
-
- // Shift up and down in order to sign extend the result.
- ret <<= 64 - uint8(len(bytes))*8
- ret >>= 64 - uint8(len(bytes))*8
- return
-}
-
-func encodeInteger(i int64) []byte {
- n := int64Length(i)
- out := make([]byte, n)
-
- var j int
- for ; n > 0; n-- {
- out[j] = (byte(i >> uint((n-1)*8)))
- j++
- }
-
- return out
-}
-
-func int64Length(i int64) (numBytes int) {
- numBytes = 1
-
- for i > 127 {
- numBytes++
- i >>= 8
- }
-
- for i < -128 {
- numBytes++
- i >>= 8
- }
-
- return
-}
-
-// DecodePacket decodes the given bytes into a single Packet
-// If a decode error is encountered, nil is returned.
-func DecodePacket(data []byte) *Packet {
- p, _, _ := readPacket(bytes.NewBuffer(data))
-
- return p
-}
-
-// DecodePacketErr decodes the given bytes into a single Packet
-// If a decode error is encountered, nil is returned
-func DecodePacketErr(data []byte) (*Packet, error) {
- p, _, err := readPacket(bytes.NewBuffer(data))
- if err != nil {
- return nil, err
- }
- return p, nil
-}
-
-// readPacket reads a single Packet from the reader, returning the number of bytes read
-func readPacket(reader io.Reader) (*Packet, int, error) {
- identifier, length, read, err := readHeader(reader)
- if err != nil {
- return nil, read, err
- }
-
- p := &Packet{
- Identifier: identifier,
- }
-
- p.Data = new(bytes.Buffer)
- p.Children = make([]*Packet, 0, 2)
- p.Value = nil
-
- if p.TagType == TypeConstructed {
- // TODO: if universal, ensure tag type is allowed to be constructed
-
- // Track how much content we've read
- contentRead := 0
- for {
- if length != LengthIndefinite {
- // End if we've read what we've been told to
- if contentRead == length {
- break
- }
- // Detect if a packet boundary didn't fall on the expected length
- if contentRead > length {
- return nil, read, fmt.Errorf("expected to read %d bytes, read %d", length, contentRead)
- }
- }
-
- // Read the next packet
- child, r, err := readPacket(reader)
- if err != nil {
- return nil, read, err
- }
- contentRead += r
- read += r
-
- // Test is this is the EOC marker for our packet
- if isEOCPacket(child) {
- if length == LengthIndefinite {
- break
- }
- return nil, read, errors.New("eoc child not allowed with definite length")
- }
-
- // Append and continue
- p.AppendChild(child)
- }
- return p, read, nil
- }
-
- if length == LengthIndefinite {
- return nil, read, errors.New("indefinite length used with primitive type")
- }
-
- // Read definite-length content
- content := make([]byte, length, length)
- if length > 0 {
- _, err := io.ReadFull(reader, content)
- if err != nil {
- if err == io.EOF {
- return nil, read, io.ErrUnexpectedEOF
- }
- return nil, read, err
- }
- read += length
- }
-
- if p.ClassType == ClassUniversal {
- p.Data.Write(content)
- p.ByteValue = content
-
- switch p.Tag {
- case TagEOC:
- case TagBoolean:
- val, _ := parseInt64(content)
-
- p.Value = val != 0
- case TagInteger:
- p.Value, _ = parseInt64(content)
- case TagBitString:
- case TagOctetString:
- // the actual string encoding is not known here
- // (e.g. for LDAP content is already an UTF8-encoded
- // string). Return the data without further processing
- p.Value = DecodeString(content)
- case TagNULL:
- case TagObjectIdentifier:
- case TagObjectDescriptor:
- case TagExternal:
- case TagRealFloat:
- case TagEnumerated:
- p.Value, _ = parseInt64(content)
- case TagEmbeddedPDV:
- case TagUTF8String:
- p.Value = DecodeString(content)
- case TagRelativeOID:
- case TagSequence:
- case TagSet:
- case TagNumericString:
- case TagPrintableString:
- p.Value = DecodeString(content)
- case TagT61String:
- case TagVideotexString:
- case TagIA5String:
- case TagUTCTime:
- case TagGeneralizedTime:
- case TagGraphicString:
- case TagVisibleString:
- case TagGeneralString:
- case TagUniversalString:
- case TagCharacterString:
- case TagBMPString:
- }
- } else {
- p.Data.Write(content)
- }
-
- return p, read, nil
-}
-
-func (p *Packet) Bytes() []byte {
- var out bytes.Buffer
-
- out.Write(encodeIdentifier(p.Identifier))
- out.Write(encodeLength(p.Data.Len()))
- out.Write(p.Data.Bytes())
-
- return out.Bytes()
-}
-
-func (p *Packet) AppendChild(child *Packet) {
- p.Data.Write(child.Bytes())
- p.Children = append(p.Children, child)
-}
-
-func Encode(ClassType Class, TagType Type, Tag Tag, Value interface{}, Description string) *Packet {
- p := new(Packet)
-
- p.ClassType = ClassType
- p.TagType = TagType
- p.Tag = Tag
- p.Data = new(bytes.Buffer)
-
- p.Children = make([]*Packet, 0, 2)
-
- p.Value = Value
- p.Description = Description
-
- if Value != nil {
- v := reflect.ValueOf(Value)
-
- if ClassType == ClassUniversal {
- switch Tag {
- case TagOctetString:
- sv, ok := v.Interface().(string)
-
- if ok {
- p.Data.Write([]byte(sv))
- }
- }
- }
- }
-
- return p
-}
-
-func NewSequence(Description string) *Packet {
- return Encode(ClassUniversal, TypeConstructed, TagSequence, nil, Description)
-}
-
-func NewBoolean(ClassType Class, TagType Type, Tag Tag, Value bool, Description string) *Packet {
- intValue := int64(0)
-
- if Value {
- intValue = 1
- }
-
- p := Encode(ClassType, TagType, Tag, nil, Description)
-
- p.Value = Value
- p.Data.Write(encodeInteger(intValue))
-
- return p
-}
-
-func NewInteger(ClassType Class, TagType Type, Tag Tag, Value interface{}, Description string) *Packet {
- p := Encode(ClassType, TagType, Tag, nil, Description)
-
- p.Value = Value
- switch v := Value.(type) {
- case int:
- p.Data.Write(encodeInteger(int64(v)))
- case uint:
- p.Data.Write(encodeInteger(int64(v)))
- case int64:
- p.Data.Write(encodeInteger(v))
- case uint64:
- // TODO : check range or add encodeUInt...
- p.Data.Write(encodeInteger(int64(v)))
- case int32:
- p.Data.Write(encodeInteger(int64(v)))
- case uint32:
- p.Data.Write(encodeInteger(int64(v)))
- case int16:
- p.Data.Write(encodeInteger(int64(v)))
- case uint16:
- p.Data.Write(encodeInteger(int64(v)))
- case int8:
- p.Data.Write(encodeInteger(int64(v)))
- case uint8:
- p.Data.Write(encodeInteger(int64(v)))
- default:
- // TODO : add support for big.Int ?
- panic(fmt.Sprintf("Invalid type %T, expected {u|}int{64|32|16|8}", v))
- }
-
- return p
-}
-
-func NewString(ClassType Class, TagType Type, Tag Tag, Value, Description string) *Packet {
- p := Encode(ClassType, TagType, Tag, nil, Description)
-
- p.Value = Value
- p.Data.Write([]byte(Value))
-
- return p
-}
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/content_int.go b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/content_int.go
deleted file mode 100644
index 1858b74b6..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/content_int.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package ber
-
-func encodeUnsignedInteger(i uint64) []byte {
- n := uint64Length(i)
- out := make([]byte, n)
-
- var j int
- for ; n > 0; n-- {
- out[j] = (byte(i >> uint((n-1)*8)))
- j++
- }
-
- return out
-}
-
-func uint64Length(i uint64) (numBytes int) {
- numBytes = 1
-
- for i > 255 {
- numBytes++
- i >>= 8
- }
-
- return
-}
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/header.go b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/header.go
deleted file mode 100644
index 123744e9b..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/header.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package ber
-
-import (
- "errors"
- "io"
-)
-
-func readHeader(reader io.Reader) (identifier Identifier, length int, read int, err error) {
- if i, c, err := readIdentifier(reader); err != nil {
- return Identifier{}, 0, read, err
- } else {
- identifier = i
- read += c
- }
-
- if l, c, err := readLength(reader); err != nil {
- return Identifier{}, 0, read, err
- } else {
- length = l
- read += c
- }
-
- // Validate length type with identifier (x.600, 8.1.3.2.a)
- if length == LengthIndefinite && identifier.TagType == TypePrimitive {
- return Identifier{}, 0, read, errors.New("indefinite length used with primitive type")
- }
-
- return identifier, length, read, nil
-}
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/identifier.go b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/identifier.go
deleted file mode 100644
index f7672a844..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/identifier.go
+++ /dev/null
@@ -1,103 +0,0 @@
-package ber
-
-import (
- "errors"
- "fmt"
- "io"
- "math"
-)
-
-func readIdentifier(reader io.Reader) (Identifier, int, error) {
- identifier := Identifier{}
- read := 0
-
- // identifier byte
- b, err := readByte(reader)
- if err != nil {
- if Debug {
- fmt.Printf("error reading identifier byte: %v\n", err)
- }
- return Identifier{}, read, err
- }
- read++
-
- identifier.ClassType = Class(b) & ClassBitmask
- identifier.TagType = Type(b) & TypeBitmask
-
- if tag := Tag(b) & TagBitmask; tag != HighTag {
- // short-form tag
- identifier.Tag = tag
- return identifier, read, nil
- }
-
- // high-tag-number tag
- tagBytes := 0
- for {
- b, err := readByte(reader)
- if err != nil {
- if Debug {
- fmt.Printf("error reading high-tag-number tag byte %d: %v\n", tagBytes, err)
- }
- return Identifier{}, read, err
- }
- tagBytes++
- read++
-
- // Lowest 7 bits get appended to the tag value (x.690, 8.1.2.4.2.b)
- identifier.Tag <<= 7
- identifier.Tag |= Tag(b) & HighTagValueBitmask
-
- // First byte may not be all zeros (x.690, 8.1.2.4.2.c)
- if tagBytes == 1 && identifier.Tag == 0 {
- return Identifier{}, read, errors.New("invalid first high-tag-number tag byte")
- }
- // Overflow of int64
- // TODO: support big int tags?
- if tagBytes > 9 {
- return Identifier{}, read, errors.New("high-tag-number tag overflow")
- }
-
- // Top bit of 0 means this is the last byte in the high-tag-number tag (x.690, 8.1.2.4.2.a)
- if Tag(b)&HighTagContinueBitmask == 0 {
- break
- }
- }
-
- return identifier, read, nil
-}
-
-func encodeIdentifier(identifier Identifier) []byte {
- b := []byte{0x0}
- b[0] |= byte(identifier.ClassType)
- b[0] |= byte(identifier.TagType)
-
- if identifier.Tag < HighTag {
- // Short-form
- b[0] |= byte(identifier.Tag)
- } else {
- // high-tag-number
- b[0] |= byte(HighTag)
-
- tag := identifier.Tag
-
- highBit := uint(63)
- for {
- if tag&(1<<highBit) != 0 {
- break
- }
- highBit--
- }
-
- tagBytes := int(math.Ceil(float64(highBit) / 7.0))
- for i := tagBytes - 1; i >= 0; i-- {
- offset := uint(i) * 7
- mask := Tag(0x7f) << offset
- tagByte := (tag & mask) >> offset
- if i != 0 {
- tagByte |= 0x80
- }
- b = append(b, byte(tagByte))
- }
- }
- return b
-}
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/length.go b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/length.go
deleted file mode 100644
index 8e2ae4ddd..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/length.go
+++ /dev/null
@@ -1,71 +0,0 @@
-package ber
-
-import (
- "errors"
- "fmt"
- "io"
-)
-
-func readLength(reader io.Reader) (length int, read int, err error) {
- // length byte
- b, err := readByte(reader)
- if err != nil {
- if Debug {
- fmt.Printf("error reading length byte: %v\n", err)
- }
- return 0, 0, err
- }
- read++
-
- switch {
- case b == 0xFF:
- // Invalid 0xFF (x.600, 8.1.3.5.c)
- return 0, read, errors.New("invalid length byte 0xff")
-
- case b == LengthLongFormBitmask:
- // Indefinite form, we have to decode packets until we encounter an EOC packet (x.600, 8.1.3.6)
- length = LengthIndefinite
-
- case b&LengthLongFormBitmask == 0:
- // Short definite form, extract the length from the bottom 7 bits (x.600, 8.1.3.4)
- length = int(b) & LengthValueBitmask
-
- case b&LengthLongFormBitmask != 0:
- // Long definite form, extract the number of length bytes to follow from the bottom 7 bits (x.600, 8.1.3.5.b)
- lengthBytes := int(b) & LengthValueBitmask
- // Protect against overflow
- // TODO: support big int length?
- if lengthBytes > 8 {
- return 0, read, errors.New("long-form length overflow")
- }
- for i := 0; i < lengthBytes; i++ {
- b, err = readByte(reader)
- if err != nil {
- if Debug {
- fmt.Printf("error reading long-form length byte %d: %v\n", i, err)
- }
- return 0, read, err
- }
- read++
-
- // x.600, 8.1.3.5
- length <<= 8
- length |= int(b)
- }
-
- default:
- return 0, read, errors.New("invalid length byte")
- }
-
- return length, read, nil
-}
-
-func encodeLength(length int) []byte {
- length_bytes := encodeUnsignedInteger(uint64(length))
- if length > 127 || len(length_bytes) > 1 {
- longFormBytes := []byte{(LengthLongFormBitmask | byte(len(length_bytes)))}
- longFormBytes = append(longFormBytes, length_bytes...)
- length_bytes = longFormBytes
- }
- return length_bytes
-}
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc1.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc1.ber
deleted file mode 100644
index 5c6ba1c6a..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc1.ber
+++ /dev/null
@@ -1 +0,0 @@
-@ \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc10.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc10.ber
deleted file mode 100644
index f733125d4..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc10.ber
+++ /dev/null
@@ -1 +0,0 @@
-  \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc11.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc11.ber
deleted file mode 100644
index cc4a609c8..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc11.ber
+++ /dev/null
@@ -1 +0,0 @@
-  015625 \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc12.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc12.ber
deleted file mode 100644
index dbb538d69..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc12.ber
+++ /dev/null
@@ -1 +0,0 @@
- I \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc13.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc13.ber
deleted file mode 100644
index f4f438e0d..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc13.ber
+++ /dev/null
Binary files differ
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc14.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc14.ber
deleted file mode 100644
index b6f2fd3a4..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc14.ber
+++ /dev/null
Binary files differ
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc15.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc15.ber
deleted file mode 100644
index 3d6da6764..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc15.ber
+++ /dev/null
@@ -1 +0,0 @@
-  \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc16.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc16.ber
deleted file mode 100644
index 68634f5f3..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc16.ber
+++ /dev/null
@@ -1 +0,0 @@
-  \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc17.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc17.ber
deleted file mode 100644
index adb9e3320..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc17.ber
+++ /dev/null
@@ -1 +0,0 @@
-   \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc18.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc18.ber
deleted file mode 100644
index fb6843f7f..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc18.ber
+++ /dev/null
@@ -1 +0,0 @@
- \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc19.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc19.ber
deleted file mode 100644
index 03afaa5de..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc19.ber
+++ /dev/null
@@ -1 +0,0 @@
- \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc2.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc2.ber
deleted file mode 100644
index 7e785773c..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc2.ber
+++ /dev/null
@@ -1 +0,0 @@
- \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc20.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc20.ber
deleted file mode 100644
index a976464b9..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc20.ber
+++ /dev/null
Binary files differ
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc21.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc21.ber
deleted file mode 100644
index d6c2f9aa7..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc21.ber
+++ /dev/null
@@ -1 +0,0 @@
-Q \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc22.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc22.ber
deleted file mode 100644
index d1d70afab..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc22.ber
+++ /dev/null
@@ -1 +0,0 @@
- \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc23.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc23.ber
deleted file mode 100644
index 0e8d18f62..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc23.ber
+++ /dev/null
@@ -1 +0,0 @@
- \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc24.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc24.ber
deleted file mode 100644
index 10565aefa..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc24.ber
+++ /dev/null
@@ -1 +0,0 @@
-`HO Jc/ \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc25.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc25.ber
deleted file mode 100644
index 1e1140524..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc25.ber
+++ /dev/null
Binary files differ
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc26.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc26.ber
deleted file mode 100644
index d28653b3b..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc26.ber
+++ /dev/null
Binary files differ
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc27.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc27.ber
deleted file mode 100644
index c8c781144..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc27.ber
+++ /dev/null
@@ -1 +0,0 @@
- \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc28.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc28.ber
deleted file mode 100644
index 415fe23ed..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc28.ber
+++ /dev/null
@@ -1 +0,0 @@
- \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc29.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc29.ber
deleted file mode 100644
index 4076f4487..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc29.ber
+++ /dev/null
Binary files differ
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc3.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc3.ber
deleted file mode 100644
index c05c900b6..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc3.ber
+++ /dev/null
@@ -1 +0,0 @@
- \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc30.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc30.ber
deleted file mode 100644
index 72bcf80f4..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc30.ber
+++ /dev/null
Binary files differ
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc31.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc31.ber
deleted file mode 100644
index 1fcc4f254..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc31.ber
+++ /dev/null
Binary files differ
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc32.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc32.ber
deleted file mode 100644
index 19b3e940a..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc32.ber
+++ /dev/null
Binary files differ
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc33.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc33.ber
deleted file mode 100644
index 6ea70c4d2..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc33.ber
+++ /dev/null
@@ -1 +0,0 @@
- \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc34.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc34.ber
deleted file mode 100644
index 61337095d..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc34.ber
+++ /dev/null
@@ -1 +0,0 @@
- \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc35.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc35.ber
deleted file mode 100644
index d27eb301a..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc35.ber
+++ /dev/null
Binary files differ
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc36.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc36.ber
deleted file mode 100644
index e5baaeacd..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc36.ber
+++ /dev/null
Binary files differ
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc37.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc37.ber
deleted file mode 100644
index d0b1cfbe1..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc37.ber
+++ /dev/null
Binary files differ
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc38.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc38.ber
deleted file mode 100644
index 090bce74b..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc38.ber
+++ /dev/null
Binary files differ
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc39.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc39.ber
deleted file mode 100644
index d9d01199b..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc39.ber
+++ /dev/null
Binary files differ
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc4.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc4.ber
deleted file mode 100644
index 2b888baac..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc4.ber
+++ /dev/null
@@ -1 +0,0 @@
- \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc40.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc40.ber
deleted file mode 100644
index 15294a501..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc40.ber
+++ /dev/null
Binary files differ
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc41.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc41.ber
deleted file mode 100644
index 276836b65..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc41.ber
+++ /dev/null
Binary files differ
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc42.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc42.ber
deleted file mode 100644
index 21cbfd10f..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc42.ber
+++ /dev/null
Binary files differ
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc43.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc43.ber
deleted file mode 100644
index 98dbd7419..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc43.ber
+++ /dev/null
@@ -1 +0,0 @@
-$ \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc44.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc44.ber
deleted file mode 100644
index d825e1ad7..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc44.ber
+++ /dev/null
Binary files differ
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc45.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc45.ber
deleted file mode 100644
index 7b861b02c..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc45.ber
+++ /dev/null
Binary files differ
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc46.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc46.ber
deleted file mode 100644
index e78deee34..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc46.ber
+++ /dev/null
Binary files differ
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc47.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc47.ber
deleted file mode 100644
index 190bb86f6..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc47.ber
+++ /dev/null
Binary files differ
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc48.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc48.ber
deleted file mode 100644
index f7f111ae6..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc48.ber
+++ /dev/null
Binary files differ
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc5.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc5.ber
deleted file mode 100644
index 45e0a0093..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc5.ber
+++ /dev/null
@@ -1 +0,0 @@
-@ \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc6.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc6.ber
deleted file mode 100644
index cee1aaf0c..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc6.ber
+++ /dev/null
@@ -1 +0,0 @@
- +0.E-5 \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc7.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc7.ber
deleted file mode 100644
index d5ae68572..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc7.ber
+++ /dev/null
@@ -1 +0,0 @@
- -0.E-5 \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc8.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc8.ber
deleted file mode 100644
index cb32a09cb..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc8.ber
+++ /dev/null
Binary files differ
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc9.ber b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc9.ber
deleted file mode 100644
index 50b43a510..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/tests/tc9.ber
+++ /dev/null
@@ -1 +0,0 @@
-  \ No newline at end of file
diff --git a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/util.go b/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/util.go
deleted file mode 100644
index 3e56b66c8..000000000
--- a/Godeps/_workspace/src/gopkg.in/asn1-ber.v1/util.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package ber
-
-import "io"
-
-func readByte(reader io.Reader) (byte, error) {
- bytes := make([]byte, 1, 1)
- _, err := io.ReadFull(reader, bytes)
- if err != nil {
- if err == io.EOF {
- return 0, io.ErrUnexpectedEOF
- }
- return 0, err
- }
- return bytes[0], nil
-}
-
-func isEOCPacket(p *Packet) bool {
- return p != nil &&
- p.Tag == TagEOC &&
- p.ClassType == ClassUniversal &&
- p.TagType == TypePrimitive &&
- len(p.ByteValue) == 0 &&
- len(p.Children) == 0
-}