remitmd 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/remitmd/cli_signer.rb +10 -6
- data/lib/remitmd.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7726bbaff2286aa99b1f12cf78138e376d620b6063dfc2c844cc3334d9d3af56
|
|
4
|
+
data.tar.gz: 438d8d1cff61e10468d5ef368bde13ffc291a977362ba6d4bde447f1bbaf8892
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 54b55932ceeff519a091e3a745e862feae46ccf9fd9dcc53ce66a6556f11c9a641c57f96ec10b2d82d7d391deb931caff6402263edb320027d3db9ffd6dd213c
|
|
7
|
+
data.tar.gz: 0aae67743e0462a6081ad907f97203d921b456beef974a81df3825c5b324e377d0c9702b8f72a7e7fed7e213ec8a2dab0455ac2c55f4b4e6148ee46cbbe8881c
|
data/lib/remitmd/cli_signer.rb
CHANGED
|
@@ -67,11 +67,11 @@ module Remitmd
|
|
|
67
67
|
|
|
68
68
|
alias to_s inspect
|
|
69
69
|
|
|
70
|
-
# Check
|
|
70
|
+
# Check conditions for CliSigner activation.
|
|
71
71
|
#
|
|
72
72
|
# 1. CLI binary found on PATH (via `which` / `where`)
|
|
73
|
-
# 2.
|
|
74
|
-
# 3. REMIT_KEY_PASSWORD env var
|
|
73
|
+
# 2. Meta file at ~/.remit/keys/default.meta (keychain — no password needed), OR
|
|
74
|
+
# 3. Keystore file at ~/.remit/keys/default.enc AND REMIT_KEY_PASSWORD env var set
|
|
75
75
|
#
|
|
76
76
|
# @param cli_path [String] path or name of the remit CLI binary
|
|
77
77
|
# @return [Boolean]
|
|
@@ -81,11 +81,15 @@ module Remitmd
|
|
|
81
81
|
_out, _err, st = Open3.capture3(which_cmd, cli_path)
|
|
82
82
|
return false unless st.success?
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
keys_dir = File.join(Dir.home, ".remit", "keys")
|
|
85
|
+
|
|
86
|
+
# 2. Keychain meta file — no password needed
|
|
87
|
+
return true if File.exist?(File.join(keys_dir, "default.meta"))
|
|
88
|
+
|
|
89
|
+
# 3. Encrypted keystore + password
|
|
90
|
+
keystore = File.join(keys_dir, "default.enc")
|
|
86
91
|
return false unless File.exist?(keystore)
|
|
87
92
|
|
|
88
|
-
# 3. REMIT_KEY_PASSWORD set
|
|
89
93
|
password = ENV["REMIT_KEY_PASSWORD"]
|
|
90
94
|
return false if password.nil? || password.empty?
|
|
91
95
|
|
data/lib/remitmd.rb
CHANGED