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 +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +2 -2
- data/lib/hiera/backend/eyaml/encryptors/pkcs7.rb +6 -3
- data/lib/hiera/backend/eyaml.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b91da5b4af241a026ec3aa896bcfd15f9dc6fef98cb34ce9e914a82909446ef
|
4
|
+
data.tar.gz: 5bbefd8470a02dce5f2c7b72710ddeed7ca4b5b08498b8c5bebf723fee607b60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
146
|
+
To decrypt something, you need the private_key.
|
147
147
|
|
148
|
-
To test decryption you can
|
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
|
|
data/lib/hiera/backend/eyaml.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2024-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: highline
|