From efc88346bec52675d5243f988aa3386d617ee1c4 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Mon, 6 Mar 2017 22:59:30 +0100 Subject: [PATCH] cli: enable "-raw64" by default This brings the CLI options back in sync with the default feature flags. --- cli_args.go | 2 +- .../example_filesystems_test.go | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cli_args.go b/cli_args.go index de36a10..00e9324 100644 --- a/cli_args.go +++ b/cli_args.go @@ -108,7 +108,7 @@ func parseCliOpts() (args argContainer) { flagSet.BoolVar(&args.reverse, "reverse", false, "Reverse mode") flagSet.BoolVar(&args.aessiv, "aessiv", false, "AES-SIV encryption") flagSet.BoolVar(&args.nonempty, "nonempty", false, "Allow mounting over non-empty directories") - flagSet.BoolVar(&args.raw64, "raw64", false, "Use unpadded base64 for file names") + flagSet.BoolVar(&args.raw64, "raw64", true, "Use unpadded base64 for file names") flagSet.BoolVar(&args.noprealloc, "noprealloc", false, "Disable preallocation before writing") flagSet.BoolVar(&args.speed, "speed", false, "Run crypto speed test") flagSet.BoolVar(&args.hkdf, "hkdf", true, "Use HKDF as an additional key derivation step") diff --git a/tests/example_filesystems/example_filesystems_test.go b/tests/example_filesystems/example_filesystems_test.go index 03ff411..d7411e6 100644 --- a/tests/example_filesystems/example_filesystems_test.go +++ b/tests/example_filesystems/example_filesystems_test.go @@ -97,7 +97,7 @@ func TestExampleFSv07(t *testing.T) { test_helpers.UnmountPanic(pDir) test_helpers.MountOrFatal(t, cDir, pDir, "-masterkey", "ed7f6d83-40cce86c-0e7d79c2-a9438710-575221bf-30a0eb60-2821fa8f-7f3123bf", - "-hkdf=false", opensslOpt) + "-raw64=false", "-hkdf=false", opensslOpt) checkExampleFS(t, pDir, true) test_helpers.UnmountPanic(pDir) } @@ -115,7 +115,7 @@ func TestExampleFSv07PlaintextNames(t *testing.T) { pDir = pDir + ".2" test_helpers.MountOrFatal(t, cDir, pDir, "-plaintextnames", "-masterkey", "6d96397b-585631e1-c7cba69d-61e738b6-4d5ad2c2-e21f0fb3-52f60d3a-b08526f7", - "-hkdf=false", opensslOpt) + "-raw64=false", "-hkdf=false", opensslOpt) checkExampleFS(t, pDir, true) test_helpers.UnmountPanic(pDir) } @@ -135,7 +135,7 @@ func TestExampleFSv09(t *testing.T) { pDir = pDir + ".2" test_helpers.MountOrFatal(t, cDir, pDir, "-masterkey", "1cafe3f4-bc316466-2214c47c-ecd89bf3-4e078fe4-f5faeea7-8b7cab02-884f5e1c", - "-hkdf=false", opensslOpt) + "-raw64=false", "-hkdf=false", opensslOpt) checkExampleFSLongnames(t, pDir) test_helpers.UnmountPanic(pDir) } @@ -154,7 +154,7 @@ func TestExampleFSv11(t *testing.T) { pDir = pDir + ".2" test_helpers.MountOrFatal(t, cDir, pDir, "-masterkey", "eaf371c3-f9a55336-8819f22b-7bccd7c2-a738cf61-7261c658-14c28a03-9428992b", - "-aessiv", "-hkdf=false", opensslOpt) + "-aessiv", "-raw64=false", "-hkdf=false", opensslOpt) checkExampleFSLongnames(t, pDir) test_helpers.UnmountPanic(pDir) } @@ -184,12 +184,12 @@ func TestExampleFSv11reverse(t *testing.T) { m := "68b51855-042abd80-635ae1ba-90152a78-2ec2d243-832ac72a-eab0561a-f2d37913" test_helpers.MountOrFatal(t, dirA, dirB, "-reverse", "-masterkey", m, - "-hkdf=false", opensslOpt) + "-raw64=false", "-hkdf=false", opensslOpt) if !test_helpers.VerifyExistence(c) { t.Errorf("%s missing", c) } test_helpers.MountOrFatal(t, dirB, dirC, "-aessiv", "-masterkey", m, - "-hkdf=false", opensslOpt) + "-raw64=false", "-hkdf=false", opensslOpt) checkExampleFSrw(t, dirC, false) test_helpers.UnmountPanic(dirC) test_helpers.UnmountPanic(dirB) @@ -220,12 +220,12 @@ func TestExampleFSv11reversePlaintextnames(t *testing.T) { m := "e7fb8f0d-2a81df9e-26611e4b-5540b218-e48aa458-c2a623af-d0c82637-1466b5f2" test_helpers.MountOrFatal(t, dirA, dirB, "-reverse", "-masterkey", m, - "-hkdf=false", opensslOpt) + "-raw64=false", "-hkdf=false", opensslOpt) if !test_helpers.VerifyExistence(c) { t.Errorf("%s missing", c) } test_helpers.MountOrFatal(t, dirB, dirC, "-aessiv", "-masterkey", m, - "-hkdf=false", opensslOpt) + "-raw64=false", "-hkdf=false", opensslOpt) checkExampleFSrw(t, dirC, false) test_helpers.UnmountPanic(dirC) test_helpers.UnmountPanic(dirB)