kms_encrypted 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f0f09d385a70037946d973c086b0eea95497df19cc8b572b899bdbb6188b55e2
4
- data.tar.gz: 2165ab882704315f6321cdac7544ed7db5a1da256187f954d292b92b14dbb35b
3
+ metadata.gz: 0d6182ffbaae6402f3cfd620f93242fe457a37aeda8609362d7eb08572f020e0
4
+ data.tar.gz: e2241d145e0407fcc6238e94ae653dc98de17538b95b4ee7df8c8ff48a94cbf3
5
5
  SHA512:
6
- metadata.gz: 341db4f5ec475a23fce65729360fe625b8e7f6905f870654ff668e8651eb89d03852a0073a53c1c2c9200cd5b33da347d8236a1430b80cdf6c46f6835d995e63
7
- data.tar.gz: ef0f312ed2695cb1f658968cd15349e9dc1d56982e99b8411e8070d0daa6cbd3e025cd613ddd920e6688f012dc8ad587c472f3f8377031e501ed62b8bd9be663
6
+ metadata.gz: b696faad41fce6bba45b23f981ec1eb1e557b9048e7e7bc79ebb4f70ee090a0bf0b8dbc68ef9226db88c2d75f3e13a1e04feabba5002a43466b845f9abb30b3c
7
+ data.tar.gz: 569fc18fcb7d7c7751735310867efd5a8411f1756f539cc2073ed3360ea1ca05a761ef3d67694427ee810f3c556d4ef1c7ea122a88ff9ddb763c480ba60f9b61
@@ -1,3 +1,7 @@
1
+ ## 1.2.1 (2020-09-28)
2
+
3
+ - Fixed `Version not active` error when switching keys
4
+
1
5
  ## 1.2.0 (2020-08-18)
2
6
 
3
7
  - Raise error when trying to rotate key used for encrypted files
@@ -43,11 +43,12 @@ module KmsEncrypted
43
43
  def decrypt(ciphertext)
44
44
  # determine version for context
45
45
  m = /\Av(\d+):/.match(ciphertext)
46
- version = m ? m[1].to_i : 1
47
- context = (options[:upgrade_context] && !m) ? {} : context(version)
46
+ ciphertext_version = m ? m[1].to_i : 1
47
+ context = (options[:upgrade_context] && !m) ? {} : context(ciphertext_version)
48
48
 
49
49
  KmsEncrypted::Box.new(
50
50
  key_id: key_id,
51
+ version: version,
51
52
  previous_versions: previous_versions
52
53
  ).decrypt(ciphertext, context: context)
53
54
  end
@@ -1,3 +1,3 @@
1
1
  module KmsEncrypted
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kms_encrypted
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-19 00:00:00.000000000 Z
11
+ date: 2020-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport