summaryrefslogtreecommitdiff
path: root/src/key
diff options
context:
space:
mode:
authorStuart Stock <stuart@int08h.com>2018-10-14 21:14:55 -0500
committerStuart Stock <stuart@int08h.com>2018-10-14 21:14:55 -0500
commit1b8ff27b86392acdd0596d8ed9ad2b0b72691042 (patch)
tree41a8b0b153f6c8c3fcb4de0520443763e5832e1a /src/key
parentac71e92f11d91cca566dd38c78bcdef2db6c1811 (diff)
downloadroughenough-1b8ff27b86392acdd0596d8ed9ad2b0b72691042.zip
implement gcp decrypt
Diffstat (limited to 'src/key')
-rw-r--r--src/key/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/key/mod.rs b/src/key/mod.rs
index bd06931..32ca241 100644
--- a/src/key/mod.rs
+++ b/src/key/mod.rs
@@ -60,8 +60,8 @@ impl FromStr for KeyProtection {
fn from_str(s: &str) -> Result<KeyProtection, ()> {
match s {
"plaintext" => Ok(KeyProtection::Plaintext),
- s if s.starts_with("arn") => Ok(KeyProtection::AwsKmsEnvelope(s.to_string())),
- s if s.starts_with("gcp") => Ok(KeyProtection::GoogleKmsEnvelope(s.to_string())),
+ s if s.starts_with("arn:") => Ok(KeyProtection::AwsKmsEnvelope(s.to_string())),
+ s if s.starts_with("projects/") => Ok(KeyProtection::GoogleKmsEnvelope(s.to_string())),
_ => Err(()),
}
}