summaryrefslogtreecommitdiff
path: root/internal/nametransform/names.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/nametransform/names.go')
-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)