forked from puppetlabs/puppet
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(PUP-2606) Add EC private key support
Adds two settings `key_type` and `named_curve`. If the former is set to `ec` then the agent will generate an EC private key, but only if it doesn't have a key yet. If an agent has a previously saved RSA key, then it will have no effect. Puppet will use the named curve specified by `named_curve`, which defaults to 'prime256v1'. Unfortunately ruby does not yet support X25519[1] Since the saved private key can be either RSA or EC, use the more generic `OpenSSL::PKey.read` method which returns the appropriate class of private key. Ruby modified the EC class extensively in 2.4 so that it followed the generic OpenSSL::PKey interface. To ensure compatibility across different ruby versions this commit monkey patches the `EC#private_key?` and `EC.generate` methods, but only if the methods are not defined. [1] ruby/openssl#117
- Loading branch information
1 parent
81aa35e
commit 63e4c80
Showing
37 changed files
with
901 additions
and
744 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,67 @@ | ||
Private-Key: (1024 bit) | ||
modulus: | ||
00:bb:e1:47:40:df:d0:06:c2:ef:5b:0b:41:41:01: | ||
f8:a3:68:fe:18:82:21:5b:97:b5:7c:25:f2:31:b9: | ||
50:09:a8:56:71:4c:81:e5:fe:e0:2b:f3:8d:38:e8: | ||
fd:15:c2:a3:5a:db:56:5d:29:49:4d:75:e5:ae:69: | ||
a7:a3:ac:19:c6:23:cb:1a:23:57:15:aa:ca:e1:e1: | ||
78:79:af:49:15:bf:7d:9a:42:16:bc:b1:18:61:68: | ||
d8:e1:34:57:4e:73:a0:90:3e:1f:8a:56:fd:0c:eb: | ||
f0:fb:03:fd:ec:1b:ff:15:1f:d7:3e:5c:73:09:15: | ||
48:83:e5:ff:4e:b3:ea:3a:a9 | ||
00:a3:a2:4c:5d:4a:02:49:6c:4d:9f:a1:88:4c:1f: | ||
34:5b:5a:78:c4:20:85:58:29:25:9c:5b:fc:55:01: | ||
3f:c3:64:37:62:65:f3:a7:bf:dd:12:bf:02:04:0c: | ||
88:78:d3:8a:20:e8:5b:55:94:f8:a9:bb:59:99:26: | ||
53:51:23:41:d1:e0:a1:6f:ad:0b:ff:cf:be:c3:d0: | ||
e6:dc:3d:c1:6b:14:25:f5:84:a4:c5:7c:2d:a4:52: | ||
e2:f0:11:9a:44:a5:c9:45:e1:cc:22:7a:43:ad:38: | ||
76:19:f3:de:e2:96:24:9e:40:81:d4:a9:f6:28:27: | ||
4c:84:9c:a0:70:f8:6a:39:f5 | ||
publicExponent: 65537 (0x10001) | ||
privateExponent: | ||
22:7d:7d:b6:24:20:2d:4d:95:e1:31:d4:bd:d9:5d: | ||
ca:a9:d8:93:a9:37:f4:77:8a:42:8b:38:c5:f6:0e: | ||
02:67:db:ce:9a:cb:f1:eb:f3:3d:3e:4d:bb:97:d1: | ||
f6:2f:b0:0b:5a:de:a4:e5:92:66:5c:f1:58:2e:5f: | ||
2f:05:c6:09:30:2e:77:0c:07:64:ea:9e:c2:f4:72: | ||
b0:f9:31:36:af:45:7e:a5:44:bf:b8:f9:1c:0d:fc: | ||
9f:8e:41:08:c4:8e:d0:8d:4e:de:2d:f3:42:c3:d0: | ||
6e:ca:70:21:bb:f5:c4:e2:67:13:21:10:5a:0b:68: | ||
7b:5d:9f:ea:08:f0:12:3d | ||
1e:f5:e6:5d:00:53:ce:70:9f:7f:44:a0:f5:46:32: | ||
31:d6:bc:62:df:84:5b:59:ed:b3:d7:f3:b6:61:b6: | ||
1e:d2:27:68:86:c1:c3:4b:9a:18:a1:eb:4f:b8:cf: | ||
59:8d:2c:e5:6d:11:5a:f0:04:dc:98:86:2b:64:04: | ||
ff:a5:1c:1e:bc:53:db:fc:aa:29:f9:0b:0e:10:70: | ||
09:53:e6:d5:be:f4:98:20:7d:8b:af:5c:d7:4e:ff: | ||
3e:09:ab:c6:80:86:bc:08:7e:95:73:34:c7:38:c8: | ||
c2:8b:41:da:78:ad:51:11:f0:19:e7:7d:8c:4e:3e: | ||
19:b0:4a:e4:c5:df:a5:41 | ||
prime1: | ||
00:e3:d5:5c:8e:b9:31:28:ce:d3:c0:78:0d:b2:12: | ||
0e:14:95:a4:b8:48:20:82:2f:27:37:f5:b8:6e:b4: | ||
ec:57:7f:92:c4:23:15:5b:d1:b6:35:20:60:49:36: | ||
fb:63:8d:df:34:45:af:07:80:a7:9b:05:2f:43:5e: | ||
af:9a:bc:9b:43 | ||
00:d3:6a:f2:e1:04:1f:d0:e4:fe:79:80:37:2a:10: | ||
a2:6a:93:dd:03:bf:9b:b6:d6:a6:f5:83:11:b7:b3: | ||
6e:f6:38:7e:d5:02:3b:70:ab:c9:3c:25:90:f0:f5: | ||
8d:43:f3:ea:35:36:b9:5d:d0:b5:7d:eb:cf:bb:5f: | ||
00:9b:3e:44:97 | ||
prime2: | ||
00:d3:1b:70:e1:ff:2d:af:09:a9:3e:65:04:58:3d: | ||
65:11:bd:98:7e:39:26:ab:33:98:37:cf:46:13:2e: | ||
6f:dd:48:0e:0c:bb:ee:3a:a7:91:60:81:6f:9f:54: | ||
65:2c:cd:8a:6f:27:a5:6a:72:f1:3d:44:9c:b3:eb: | ||
b8:56:6f:b5:a3 | ||
00:c6:23:d1:59:48:26:9e:4a:ec:be:2b:a5:53:70: | ||
80:88:53:30:2e:87:19:a6:1d:0b:a7:8f:d3:98:ca: | ||
6c:63:a5:fd:3d:20:7d:4c:1b:79:57:7b:e7:66:93: | ||
fd:e6:03:94:04:a9:aa:2b:9e:ed:a0:e7:a5:0e:be: | ||
db:5f:64:8b:53 | ||
exponent1: | ||
00:b4:ef:ca:4c:f2:98:2e:ef:6a:cd:8c:ca:5b:a3: | ||
e9:18:c1:eb:0a:0b:05:fe:3d:92:68:e7:b5:2b:fe: | ||
75:3f:db:e9:e3:e8:74:da:f1:c6:41:94:cf:c2:f5: | ||
6e:5a:16:de:af:75:b3:d6:42:7f:59:26:99:ed:67: | ||
f2:0f:f2:3f:5f | ||
00:9d:4b:dd:18:fd:70:8e:83:51:b2:24:6a:e6:a9: | ||
29:ae:12:05:46:5c:b1:05:ff:fe:88:7b:d4:1a:d1: | ||
2d:a5:93:b3:09:d8:77:51:04:fe:db:f9:37:35:8f: | ||
fc:62:aa:7f:7e:c8:10:72:74:6e:14:19:f6:9c:79: | ||
ba:81:c6:7a:51 | ||
exponent2: | ||
10:8b:45:fd:70:12:14:75:9d:5d:d6:6c:d0:bd:7e: | ||
fe:34:ed:8e:76:cc:20:fe:9a:1f:45:8f:28:51:ab: | ||
52:9c:22:fd:bc:7c:9e:fc:22:d8:7d:4c:52:20:3b: | ||
0d:97:ce:11:87:f9:de:ad:c3:5a:19:d6:6e:03:3b: | ||
1f:0b:02:21 | ||
00:84:25:8d:51:4b:82:9e:1e:00:69:10:f8:f1:7e: | ||
5d:eb:0d:f8:5b:7f:b5:46:89:a6:a5:39:92:79:1b: | ||
c0:50:71:7b:45:12:6f:1e:9c:50:40:5d:9d:c6:57: | ||
3b:85:f5:aa:f9:b5:22:8e:77:2f:ab:19:f3:86:b3: | ||
19:e2:34:4f:8b | ||
coefficient: | ||
00:a9:b1:a0:81:72:a1:e9:41:51:3e:32:5a:33:aa: | ||
20:b1:23:bf:ff:62:53:a7:6d:e2:c1:d5:18:11:57: | ||
b6:9e:fd:b2:c5:d8:d8:50:d1:5e:5c:22:ba:14:e3: | ||
36:92:34:4c:29:19:dc:a3:60:a8:01:81:00:5b:c1: | ||
3b:4e:0f:26:23 | ||
21:c3:0e:85:b6:8d:3f:c8:85:ae:31:da:52:43:16: | ||
06:0e:8a:9d:95:6d:bb:8b:97:09:0a:fa:9e:9f:9c: | ||
5f:7f:b9:6f:e8:db:73:a5:34:13:fa:73:1a:6e:67: | ||
ee:6f:c2:7f:e9:67:03:23:f6:2d:ca:cb:a2:85:67: | ||
28:e5:df:a3 | ||
-----BEGIN RSA PRIVATE KEY----- | ||
MIICXQIBAAKBgQC74UdA39AGwu9bC0FBAfijaP4YgiFbl7V8JfIxuVAJqFZxTIHl | ||
/uAr84046P0VwqNa21ZdKUlNdeWuaaejrBnGI8saI1cVqsrh4Xh5r0kVv32aQha8 | ||
sRhhaNjhNFdOc6CQPh+KVv0M6/D7A/3sG/8VH9c+XHMJFUiD5f9Os+o6qQIDAQAB | ||
AoGAIn19tiQgLU2V4THUvdldyqnYk6k39HeKQos4xfYOAmfbzprL8evzPT5Nu5fR | ||
9i+wC1repOWSZlzxWC5fLwXGCTAudwwHZOqewvRysPkxNq9FfqVEv7j5HA38n45B | ||
CMSO0I1O3i3zQsPQbspwIbv1xOJnEyEQWgtoe12f6gjwEj0CQQDj1VyOuTEoztPA | ||
eA2yEg4UlaS4SCCCLyc39bhutOxXf5LEIxVb0bY1IGBJNvtjjd80Ra8HgKebBS9D | ||
Xq+avJtDAkEA0xtw4f8trwmpPmUEWD1lEb2YfjkmqzOYN89GEy5v3UgODLvuOqeR | ||
YIFvn1RlLM2KbyelanLxPUScs+u4Vm+1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oqdlW27i5cJCvqen5xf | ||
f7lv6NtzpTQT+nMabmfub8J/6WcDI/YtysuihWco5d+j | ||
-----END RSA PRIVATE KEY----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.