aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--b64file/file.go11
-rw-r--r--verify.go3
2 files changed, 2 insertions, 12 deletions
diff --git a/b64file/file.go b/b64file/file.go
index 6f5dd28..624dc2d 100644
--- a/b64file/file.go
+++ b/b64file/file.go
@@ -3,7 +3,6 @@ package b64file
import (
"bufio"
- "bytes"
"encoding"
"encoding/base64"
"errors"
@@ -18,16 +17,6 @@ const untrusted = "untrusted comment: "
// Original Error: "invalid comment in %s; must start with 'untrusted comment: '"
var ErrUntrusted = errors.New("comment must start with 'untrusted comment: '")
-func DecodeString(data string, u encoding.BinaryUnmarshaler) (string, []byte, error) {
- r := strings.NewReader(data)
- return Decode(r, u)
-}
-
-func DecodeBytes(data []byte, u encoding.BinaryUnmarshaler) (string, []byte, error) {
- r := bytes.NewReader(data)
- return Decode(r, u)
-}
-
func Decode(r io.Reader, u encoding.BinaryUnmarshaler) (string, []byte, error) {
buf := bufio.NewReader(r)
diff --git a/verify.go b/verify.go
index 0f5294e..0934762 100644
--- a/verify.go
+++ b/verify.go
@@ -4,6 +4,7 @@ import (
"flag"
"fmt"
"io/ioutil"
+ "strings"
"dim13.org/signify/b64file"
"dim13.org/signify/key"
@@ -102,7 +103,7 @@ func verifyGzip(pubFile, sigFile string) error {
}
sig := new(key.Sig)
- _, msg, err := b64file.DecodeString(z.Comment, sig)
+ _, msg, err := b64file.Decode(strings.NewReader(z.Comment), sig)
if err != nil {
return err
}