hiera-eyaml 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +7 -1
- data/bin/eyaml +11 -11
- data/lib/hiera/backend/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -41,7 +41,7 @@ The first step is to create a pair of keys on the Puppet master
|
|
41
41
|
|
42
42
|
$ eyaml -c
|
43
43
|
|
44
|
-
This creates a public and private key with default names in the default location. (keys
|
44
|
+
This creates a public and private key with default names in the default location. (/etc/hiera/keys directory)
|
45
45
|
|
46
46
|
### Encryption
|
47
47
|
|
@@ -133,3 +133,9 @@ things:
|
|
133
133
|
- - nested thing 2.0
|
134
134
|
- nested thing 2.1
|
135
135
|
</pre>
|
136
|
+
|
137
|
+
Authors
|
138
|
+
=======
|
139
|
+
|
140
|
+
- [Tom Poulton](http://github.com/TomPoulton) - Initial author. eyaml backend.
|
141
|
+
- [Geoff Meakin](http://github.com/gtmtech) - Major contributor. eyaml command.
|
data/bin/eyaml
CHANGED
@@ -37,8 +37,8 @@ end
|
|
37
37
|
Trollop::die "You cannot specify --encrypt and --decrypt" if options[:encrypt] and options[:decrypt]
|
38
38
|
|
39
39
|
# Defaults
|
40
|
-
options[:
|
41
|
-
options[:
|
40
|
+
options[:private_key] ||= "/etc/hiera/keys/private_key.pem"
|
41
|
+
options[:public_key] ||= "/etc/hiera/keys/public_key.pem"
|
42
42
|
options[:string] = ARGV.join(' ')
|
43
43
|
|
44
44
|
if options[:password]
|
@@ -51,15 +51,15 @@ if options[:createkeys]
|
|
51
51
|
# Try to do equivalent of:
|
52
52
|
# openssl req -x509 -nodes -days 100000 -newkey rsa:2048 -keyout privatekey.pem -out publickey.pem -subj '/'
|
53
53
|
|
54
|
-
ensureKeyDirExists(options[:
|
55
|
-
ensureKeyDirExists(options[:
|
54
|
+
ensureKeyDirExists(options[:private_key])
|
55
|
+
ensureKeyDirExists(options[:public_key])
|
56
56
|
|
57
57
|
key = OpenSSL::PKey::RSA.new(2048)
|
58
|
-
open( options[:
|
58
|
+
open( options[:private_key], "w" ) do |io|
|
59
59
|
io.write(key.to_pem)
|
60
60
|
end
|
61
61
|
|
62
|
-
puts "#{options[:
|
62
|
+
puts "#{options[:private_key]} created."
|
63
63
|
|
64
64
|
name = OpenSSL::X509::Name.parse("/")
|
65
65
|
cert = OpenSSL::X509::Certificate.new()
|
@@ -82,10 +82,10 @@ if options[:createkeys]
|
|
82
82
|
|
83
83
|
cert.sign key, OpenSSL::Digest::SHA1.new
|
84
84
|
|
85
|
-
open( options[:
|
85
|
+
open( options[:public_key], "w" ) do |io|
|
86
86
|
io.write(cert.to_pem)
|
87
87
|
end
|
88
|
-
puts "#{options[:
|
88
|
+
puts "#{options[:public_key]} created."
|
89
89
|
exit
|
90
90
|
end
|
91
91
|
|
@@ -100,7 +100,7 @@ if options[:encrypt]
|
|
100
100
|
exit
|
101
101
|
end
|
102
102
|
|
103
|
-
public_key_pem = File.read( options[:
|
103
|
+
public_key_pem = File.read( options[:public_key] )
|
104
104
|
public_key = OpenSSL::X509::Certificate.new( public_key_pem )
|
105
105
|
|
106
106
|
cipher = OpenSSL::Cipher::AES.new(256, :CBC)
|
@@ -131,10 +131,10 @@ if options[:decrypt]
|
|
131
131
|
exit
|
132
132
|
end
|
133
133
|
|
134
|
-
private_key_pem = File.read( options[:
|
134
|
+
private_key_pem = File.read( options[:private_key] )
|
135
135
|
private_key = OpenSSL::PKey::RSA.new( private_key_pem )
|
136
136
|
|
137
|
-
public_key_pem = File.read( options[:
|
137
|
+
public_key_pem = File.read( options[:public_key] )
|
138
138
|
public_key = OpenSSL::X509::Certificate.new( public_key_pem )
|
139
139
|
|
140
140
|
pkcs7 = OpenSSL::PKCS7.new( ciphertext_decoded )
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hiera-eyaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: trollop
|