diff options
| author | Shulhan <ms@kilabit.info> | 2023-07-24 13:01:36 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-10-06 10:03:04 +0700 |
| commit | 8a1a81a6428ae970569d9c2a506acf90deb2e0c4 (patch) | |
| tree | d3e82e19718962181b51572a0395ed6b1cef2222 /testdata | |
| parent | 479e33040d93e582aa10f19c299b2633f2270d24 (diff) | |
| download | gotp-8a1a81a6428ae970569d9c2a506acf90deb2e0c4.tar.xz | |
all: unfold private key path before reading
By unfolding, user can set the path to private key using "~" that points
to their home.
This make the key can works across home directory, in case user have
multiple homes (Linux and macOS have different home path and maybe
user name, but both can use "~" as substitution for $HOME)
Diffstat (limited to 'testdata')
| -rw-r--r-- | testdata/config_marshaler_test.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testdata/config_marshaler_test.txt b/testdata/config_marshaler_test.txt new file mode 100644 index 0000000..b354b28 --- /dev/null +++ b/testdata/config_marshaler_test.txt @@ -0,0 +1,17 @@ +Test UnmarshalText and MarshalText on config. + +>>> input.ini +[gotp "issuer"] +test1 = SHA1:a:6:30: +test2 = SHA1:b:6:30: + +[gotp] +private_key = ~/myprivatekey.pem + +<<< output.ini +[gotp "issuer"] +test1 = SHA1:a:6:30: +test2 = SHA1:b:6:30: + +[gotp] +private_key = ~/myprivatekey.pem |
