summaryrefslogtreecommitdiff
path: root/internal/nametransform
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-09-25 18:01:24 +0200
committerJakob Unterwurzacher2016-09-25 18:01:24 +0200
commitb883dd10a62eb8d7ddf589e2878d8e0f65a90e83 (patch)
treebd500c18f8c7bd8095617011eb0ea3dace11ac5c /internal/nametransform
parent12808138ef105824de97924a585ad66bacb3a18b (diff)
reverse: add symlink encryption and Readlink support
Diffstat (limited to 'internal/nametransform')
-rw-r--r--internal/nametransform/names.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/nametransform/names.go b/internal/nametransform/names.go
index e9fe87d..4df3430 100644
--- a/internal/nametransform/names.go
+++ b/internal/nametransform/names.go
@@ -4,7 +4,6 @@ package nametransform
import (
"crypto/aes"
"encoding/base64"
- "fmt"
"syscall"
"github.com/rfjakob/eme"
@@ -38,7 +37,8 @@ func (n *NameTransform) DecryptName(cipherName string, iv []byte) (string, error
return "", err
}
if len(bin)%aes.BlockSize != 0 {
- return "", fmt.Errorf("Decoded length %d is not a multiple of the AES block size", len(bin))
+ tlog.Warn.Printf("DecryptName %q: decoded length %d is not a multiple of 16", cipherName, len(bin))
+ return "", syscall.EINVAL
}
bin = eme.Transform(n.cryptoCore.BlockCipher, iv, bin, eme.DirectionDecrypt)
bin, err = unPad16(bin)