hiera-eyaml 4.0.0 → 4.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 678588aef70424addfe72a90edea53713e702cd2a55c4f707c19b1eb513f435e
4
- data.tar.gz: 7ee2ee82496e760e298181a5109b43da47b260628f5934f950e60db0d67d50e4
3
+ metadata.gz: 2b91da5b4af241a026ec3aa896bcfd15f9dc6fef98cb34ce9e914a82909446ef
4
+ data.tar.gz: 5bbefd8470a02dce5f2c7b72710ddeed7ca4b5b08498b8c5bebf723fee607b60
5
5
  SHA512:
6
- metadata.gz: '029e218037fb48bea447bed3c046272a5a6932b1741a1b456092951940fd3c39e5a85d3b3593a87f5a76bf3ed4fbaa10b6d4ab72a20e05ee28fe4b55d2bbbc2d'
7
- data.tar.gz: ef8d842be54361731abca7a3d2ff953a63cb42174f6746d4079ce124d28f1b7a0801a0043f74f110ac8b450586e1a9ea55148f73bfa4aceb376393b444d61956
6
+ metadata.gz: b467938cd57dde4f5b9ae926d386d18707273c153729c279786f249543d7e46bcdc666f4db32e8120fac44a80e5845a12e863edd3f91ee39c7c23bbbadaa3c8a
7
+ data.tar.gz: 29763852256aee1a4b902d3963742613af410e15277182f73851af80a5b39a704f2d8a4d73f44143e4e364808507ae40dfd3cdd04ad8e4b8d3ec8c51596c7145
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [v4.1.0](https://github.com/voxpupuli/hiera-eyaml/tree/v4.1.0) (2024-05-10)
6
+
7
+ [Full Changelog](https://github.com/voxpupuli/hiera-eyaml/compare/v4.0.0...v4.1.0)
8
+
9
+ **Implemented enhancements:**
10
+
11
+ - Remove public key requirement to decrypt [\#378](https://github.com/voxpupuli/hiera-eyaml/pull/378) ([cmd-ntrf](https://github.com/cmd-ntrf))
12
+
5
13
  ## [v4.0.0](https://github.com/voxpupuli/hiera-eyaml/tree/v4.0.0) (2024-05-10)
6
14
 
7
15
  [Full Changelog](https://github.com/voxpupuli/hiera-eyaml/compare/v3.4.0...v4.0.0)
data/README.md CHANGED
@@ -143,9 +143,9 @@ Use the -l parameter to pass in a label for the encrypted value,
143
143
 
144
144
  ### Decryption
145
145
 
146
- To decrypt something, you need the public_key and the private_key.
146
+ To decrypt something, you need the private_key.
147
147
 
148
- To test decryption you can also use the eyaml tool if you have both keys
148
+ To test decryption you can use the eyaml tool
149
149
 
150
150
  $ eyaml decrypt -f filename # Decrypt a file
151
151
  $ eyaml decrypt -s 'ENC[PKCS7,.....]' # Decrypt a string
@@ -51,10 +51,13 @@ class Hiera
51
51
  private_key_pem = load_private_key_pem
52
52
  private_key_rsa = OpenSSL::PKey::RSA.new(private_key_pem)
53
53
 
54
- public_key_pem = load_public_key_pem
55
- public_key_x509 = OpenSSL::X509::Certificate.new(public_key_pem)
56
-
57
54
  pkcs7 = OpenSSL::PKCS7.new(ciphertext)
55
+
56
+ public_key_x509 = OpenSSL::X509::Certificate.new
57
+ public_key_x509.serial = pkcs7.recipients[0].serial
58
+ public_key_x509.issuer = pkcs7.recipients[0].issuer
59
+ public_key_x509.public_key = private_key_rsa.public_key
60
+
58
61
  pkcs7.decrypt(private_key_rsa, public_key_x509)
59
62
  end
60
63
 
@@ -1,7 +1,7 @@
1
1
  class Hiera
2
2
  module Backend
3
3
  module Eyaml
4
- VERSION = '4.0.0'
4
+ VERSION = '4.1.0'
5
5
  DESCRIPTION = 'Hiera-eyaml is a backend for Hiera which provides OpenSSL encryption/decryption for Hiera properties'
6
6
 
7
7
  class RecoverableError < StandardError
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiera-eyaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vox Pupuli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-10 00:00:00.000000000 Z
11
+ date: 2024-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline