diff options
Diffstat (limited to 'pathfs_frontend')
-rw-r--r-- | pathfs_frontend/args.go | 1 | ||||
-rw-r--r-- | pathfs_frontend/file.go | 2 | ||||
-rw-r--r-- | pathfs_frontend/fs.go | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/pathfs_frontend/args.go b/pathfs_frontend/args.go index fb0b81f..91f9ba7 100644 --- a/pathfs_frontend/args.go +++ b/pathfs_frontend/args.go @@ -8,4 +8,5 @@ type Args struct { PlaintextNames bool DirIV bool EMENames bool + GCMIV128 bool } diff --git a/pathfs_frontend/file.go b/pathfs_frontend/file.go index 1f71bfb..d38a37b 100644 --- a/pathfs_frontend/file.go +++ b/pathfs_frontend/file.go @@ -266,7 +266,7 @@ func (f *file) doWrite(data []byte, off int64) (uint32, fuse.Status) { blockOffset, blockLen := b.CiphertextRange() blockData = f.cfs.EncryptBlock(blockData, b.BlockNo, f.header.Id) cryptfs.Debug.Printf("ino%d: Writing %d bytes to block #%d, md5=%s\n", - f.ino, len(blockData)-cryptfs.BLOCK_OVERHEAD, b.BlockNo, cryptfs.Debug.Md5sum(blockData)) + f.ino, uint64(len(blockData))-f.cfs.BlockOverhead(), b.BlockNo, cryptfs.Debug.Md5sum(blockData)) // Prevent partially written (=corrupt) blocks by preallocating the space beforehand f.fdLock.Lock() diff --git a/pathfs_frontend/fs.go b/pathfs_frontend/fs.go index e930228..324020d 100644 --- a/pathfs_frontend/fs.go +++ b/pathfs_frontend/fs.go @@ -29,7 +29,7 @@ type FS struct { // Encrypted FUSE overlay filesystem func NewFS(args Args) *FS { return &FS{ - CryptFS: cryptfs.NewCryptFS(args.Masterkey, args.OpenSSL, args.PlaintextNames), + CryptFS: cryptfs.NewCryptFS(args.Masterkey, args.OpenSSL, args.PlaintextNames, args.GCMIV128), FileSystem: pathfs.NewLoopbackFileSystem(args.Cipherdir), args: args, } |