From 3b8f5cbb17c964224456bb36b096feafb0e24f44 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 18 Feb 2018 14:26:54 +0100 Subject: readpassword: convert from string to []byte This will allows us to overwrite the password with zeros once we are done with it. https://github.com/rfjakob/gocryptfs/issues/211 --- internal/readpassword/stdin_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/readpassword/stdin_test.go') diff --git a/internal/readpassword/stdin_test.go b/internal/readpassword/stdin_test.go index 2d9f93f..8cf9954 100644 --- a/internal/readpassword/stdin_test.go +++ b/internal/readpassword/stdin_test.go @@ -11,7 +11,7 @@ import ( func TestStdin(t *testing.T) { p1 := "g55434t55wef" if os.Getenv("TEST_SLAVE") == "1" { - p2 := readPasswordStdin() + p2 := string(readPasswordStdin()) if p1 != p2 { fmt.Fprintf(os.Stderr, "%q != %q", p1, p2) os.Exit(1) @@ -44,7 +44,7 @@ func TestStdin(t *testing.T) { func TestStdinEof(t *testing.T) { p1 := "asd45as5f4a36" if os.Getenv("TEST_SLAVE") == "1" { - p2 := readPasswordStdin() + p2 := string(readPasswordStdin()) if p1 != p2 { fmt.Fprintf(os.Stderr, "%q != %q", p1, p2) os.Exit(1) -- cgit v1.2.3