aboutsummaryrefslogtreecommitdiff
path: root/sign.go
diff options
context:
space:
mode:
Diffstat (limited to 'sign.go')
-rw-r--r--sign.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/sign.go b/sign.go
index ba49418..1a9fec7 100644
--- a/sign.go
+++ b/sign.go
@@ -7,7 +7,7 @@ import (
"os"
"dim13.org/signify/ask"
- "dim13.org/signify/file"
+ "dim13.org/signify/b64file"
"dim13.org/signify/key"
"dim13.org/signify/zsig"
)
@@ -29,7 +29,7 @@ func sign(args []string) error {
return nil
}
if *sigFile == "" {
- *sigFile = file.SigName(*msgFile)
+ *sigFile = b64file.SigName(*msgFile)
}
switch {
@@ -62,8 +62,8 @@ func signPlain(secFile, msgFile, sigFile string) error {
return err
}
sig := sec.Sign(msg)
- comment := file.VerifyWith(secFile)
- return file.EncodeFile(sigFile, file.ModeSig, sig, comment, nil)
+ comment := b64file.VerifyWith(secFile)
+ return b64file.EncodeFile(sigFile, b64file.ModeSig, sig, comment, nil)
}
func signEmbedded(secFile, msgFile, sigFile string) error {
@@ -76,8 +76,8 @@ func signEmbedded(secFile, msgFile, sigFile string) error {
return err
}
sig := sec.Sign(msg)
- comment := file.VerifyWith(secFile)
- return file.EncodeFile(sigFile, file.ModeSig, sig, comment, msg)
+ comment := b64file.VerifyWith(secFile)
+ return b64file.EncodeFile(sigFile, b64file.ModeSig, sig, comment, msg)
}
// TODO
@@ -107,7 +107,7 @@ func signGzip(secFile, msgFile, sigFile string) error {
func openSec(fname string) (*key.Sec, error) {
sec := new(key.Sec)
- if _, _, err := file.DecodeFile(fname, sec); err != nil {
+ if _, _, err := b64file.DecodeFile(fname, sec); err != nil {
return nil, err
}
if err := sec.Crypt(ask.Passphrase{}); err != nil {