aboutsummaryrefslogtreecommitdiff
path: root/testdata/cli_SetPrivateKey_test.txt
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-05-16 00:06:39 +0700
committerShulhan <ms@kilabit.info>2023-05-16 00:06:39 +0700
commit6a9e476354d23da316a94d0d5a7f8b14a273910e (patch)
tree2b3cd9df782fa41edde4b3282b7375825684be40 /testdata/cli_SetPrivateKey_test.txt
parent6fd1ef57498aad5b73808f2b2260ccfe76ae649c (diff)
downloadgotp-6a9e476354d23da316a94d0d5a7f8b14a273910e.tar.xz
all: add command to set private key
The set-private-key command encrypt the issuer's value (hash:secret...) in the file using private key. The supported private key is RSA.
Diffstat (limited to 'testdata/cli_SetPrivateKey_test.txt')
-rw-r--r--testdata/cli_SetPrivateKey_test.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/testdata/cli_SetPrivateKey_test.txt b/testdata/cli_SetPrivateKey_test.txt
new file mode 100644
index 0000000..1162ead
--- /dev/null
+++ b/testdata/cli_SetPrivateKey_test.txt
@@ -0,0 +1,22 @@
+private_key_openssl: testdata/keys/rsa-openssl.pem
+private_key_openssh: testdata/keys/rsa-openssh.pem
+
+Test setting private key from unencrypted configuration.
+
+>>> config.ini.before
+[gotp "issuer"]
+test1 = SHA1:a:6:30:
+test2 = SHA1:b:6:30:
+test3 = SHA1:c:6:30:
+test4 = SHA1:d:6:30:
+test5 = SHA1:e:6:30:
+
+[gotp]
+private_key =
+
+<<< issuers
+test1 = SHA1:a:6:30:
+test2 = SHA1:b:6:30:
+test3 = SHA1:c:6:30:
+test4 = SHA1:d:6:30:
+test5 = SHA1:e:6:30: