From 6a9e476354d23da316a94d0d5a7f8b14a273910e Mon Sep 17 00:00:00 2001 From: Shulhan Date: Tue, 16 May 2023 00:06:39 +0700 Subject: 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. --- testdata/cli_SetPrivateKey_test.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 testdata/cli_SetPrivateKey_test.txt (limited to 'testdata/cli_SetPrivateKey_test.txt') 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: -- cgit v1.3