Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

tls: added ECDH ciphers support #5854

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions doc/api/tls.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ automatically set as a listener for the [secureConnection][] event. The
conjunction with the `honorCipherOrder` option described below to
prioritize the non-CBC cipher.

Defaults to `AES128-GCM-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH`.
Defaults to `ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH`.
Consult the [OpenSSL cipher list format documentation] for details on the
format. ECDH (Elliptic Curve Diffie-Hellman) ciphers are not yet supported.
format.


`AES128-GCM-SHA256` is used when node.js is linked against OpenSSL 1.0.1
Expand All @@ -129,6 +129,17 @@ automatically set as a listener for the [secureConnection][] event. The
acceptable cipher. Unfortunately, `AES256-SHA` is a CBC cipher and therefore
susceptible to BEAST attacks. Do *not* use it.

- `ecdhCurve`: A string describing a named curve to use for ECDH ciphers or
false to disable all ECDH ciphers.

This is required to support ECDH (Elliptic Curve Diffie-Hellman) ciphers.
ECDH ciphers are a newer alternative to RSA. The advantages of ECDH over
RSA is that it offers [Forward secrecy]. Forward secrecy means that for an

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get confused here. PFS in TLS has to do with the initial key-exchange, not the encryption itself. Using ECDH for key exchange is not considered as perfectly forward secure, because the parameters do not change (this is only the case with ECDHE). Also, DHE is considered to offer PFS, but ECDH is not really better than DH. Once your (EC)DH parameters are exposed, encryption keys can be computed from previously collected traffic affecting all past and future connections.

Furthermore, RSA is not in competition for key-exchange, it is used to deliver the certificate(s). It's counterpart is not ECDH but ECDSA. Comparing ECDH and RSA is complete rubbish. You compare a key-exchange method with a cipher. ECDH is not a cipher!

Also, this wording gives the idea that PFS cannot be achieved with RSA, but again DHE_RSA is perfectly forward secure!

Please fix this paragraph.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FlowLo thank you! You've very interesting insights on this topic, may I ask you to open a pull request for this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that it was supported in node v0.10.x. Please try with 0.11.x, it was introduced in bb909.

Seems to be working fine for me. I've checked some articles on this topic and totally agree with your thoughts in the first comment. Only ephemeral Diffie-Hellman provides PFS. And EC* just makes it harder to crack. Please submit a PR to fix this!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are totally right, it runs with 0.11.10, sorry for bothering you! Will write up a PR now, cheers :)

attacker it won't be possible to decrypt your previous data exchanges if
they get access to your private key.

Defaults to `prime256v1`. Consult [RFC 4492] for more details.

- `handshakeTimeout`: Abort the connection if the SSL/TLS handshake does not
finish in this many milliseconds. The default is 120 seconds.

Expand Down Expand Up @@ -629,3 +640,5 @@ The numeric representation of the local port.
[SSL_METHODS]: http://www.openssl.org/docs/ssl/ssl.html#DEALING_WITH_PROTOCOL_METHODS
[tls.Server]: #tls_class_tls_server
[SSL_CTX_set_timeout]: http://www.openssl.org/docs/ssl/SSL_CTX_set_timeout.html
[RFC 4492]: http://www.rfc-editor.org/rfc/rfc4492.txt
[Forward secrecy]: http://en.wikipedia.org/wiki/Perfect_forward_secrecy
4 changes: 4 additions & 0 deletions lib/_tls_wrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,8 @@ function Server(/* [options], listener */) {
cert: self.cert,
ca: self.ca,
ciphers: self.ciphers || tls.DEFAULT_CIPHERS,
ecdhCurve: util.isUndefined(self.ecdhCurve) ?
tls.DEFAULT_ECDH_CURVE : self.ecdhCurve,
secureProtocol: self.secureProtocol,
secureOptions: self.secureOptions,
crl: self.crl,
Expand Down Expand Up @@ -580,6 +582,8 @@ Server.prototype.setOptions = function(options) {
if (options.secureProtocol) this.secureProtocol = options.secureProtocol;
if (options.crl) this.crl = options.crl;
if (options.ciphers) this.ciphers = options.ciphers;
if (!util.isUndefined(options.ecdhCurve))
this.ecdhCurve = options.ecdhCurve;
if (options.sessionTimeout) this.sessionTimeout = options.sessionTimeout;
var secureOptions = options.secureOptions || 0;
if (options.honorCipherOrder) {
Expand Down
2 changes: 2 additions & 0 deletions lib/crypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ exports.createCredentials = function(options, context) {

if (options.ciphers) c.context.setCiphers(options.ciphers);

if (options.ecdhCurve) c.context.setECDHCurve(options.ecdhCurve);

if (options.ca) {
if (util.isArray(options.ca)) {
for (var i = 0, len = options.ca.length; i < len; i++) {
Expand Down
2 changes: 2 additions & 0 deletions lib/tls.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ exports.DEFAULT_CIPHERS =
'ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:' + // TLS 1.2
'RC4:HIGH:!MD5:!aNULL:!EDH'; // TLS 1.0

exports.DEFAULT_ECDH_CURVE = 'prime256v1';

// Allow {CLIENT_RENEG_LIMIT} client-initiated session renegotiations
// every {CLIENT_RENEG_WINDOW} seconds. An error event is emitted if more
// renegotations are seen. The settings are applied to all remote client
Expand Down
28 changes: 28 additions & 0 deletions src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ void SecureContext::Initialize(Environment* env, Handle<Object> target) {
NODE_SET_PROTOTYPE_METHOD(t, "addCRL", SecureContext::AddCRL);
NODE_SET_PROTOTYPE_METHOD(t, "addRootCerts", SecureContext::AddRootCerts);
NODE_SET_PROTOTYPE_METHOD(t, "setCiphers", SecureContext::SetCiphers);
NODE_SET_PROTOTYPE_METHOD(t, "setECDHCurve", SecureContext::SetECDHCurve);
NODE_SET_PROTOTYPE_METHOD(t, "setOptions", SecureContext::SetOptions);
NODE_SET_PROTOTYPE_METHOD(t, "setSessionIdContext",
SecureContext::SetSessionIdContext);
Expand Down Expand Up @@ -590,6 +591,33 @@ void SecureContext::SetCiphers(const FunctionCallbackInfo<Value>& args) {
}


void SecureContext::SetECDHCurve(const FunctionCallbackInfo<Value>& args) {
HandleScope scope(node_isolate);

SecureContext* sc = WeakObject::Unwrap<SecureContext>(args.This());

if (args.Length() != 1 || !args[0]->IsString())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A similar issue #4317 supports multiple curves being defined here, is that an interesting feature that should be had?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if what this pull request does really works. It seems to generate a fixed key for each curve and then uses these for each request. My understanding was that for forward security this key needs to be newly generated for each request. I could be wrong on this and the documentation on SSL_CTX_set_tmp_ecdh_callback is non-existent. The way I have implemented it is the same way as nginx and apache.

return ThrowTypeError("First argument should be a string");

String::Utf8Value curve(args[0]);

int nid = OBJ_sn2nid(*curve);

if (nid == NID_undef)
return ThrowTypeError("First argument should be a valid curve name");

EC_KEY* ecdh = EC_KEY_new_by_curve_name(nid);

if (!ecdh)
return ThrowTypeError("First argument should be a valid curve name");

SSL_CTX_set_options(sc->ctx_, SSL_OP_SINGLE_ECDH_USE);
SSL_CTX_set_tmp_ecdh(sc->ctx_, ecdh);

EC_KEY_free(ecdh);
}


void SecureContext::SetOptions(const FunctionCallbackInfo<Value>& args) {
HandleScope scope(node_isolate);

Expand Down
1 change: 1 addition & 0 deletions src/node_crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class SecureContext : public WeakObject {
static void AddCRL(const v8::FunctionCallbackInfo<v8::Value>& args);
static void AddRootCerts(const v8::FunctionCallbackInfo<v8::Value>& args);
static void SetCiphers(const v8::FunctionCallbackInfo<v8::Value>& args);
static void SetECDHCurve(const v8::FunctionCallbackInfo<v8::Value>& args);
static void SetOptions(const v8::FunctionCallbackInfo<v8::Value>& args);
static void SetSessionIdContext(
const v8::FunctionCallbackInfo<v8::Value>& args);
Expand Down
18 changes: 10 additions & 8 deletions test/fixtures/keys/agent1-cert.pem
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
-----BEGIN CERTIFICATE-----
MIICKjCCAZMCCQDQ8o4kHKdCPDANBgkqhkiG9w0BAQUFADB6MQswCQYDVQQGEwJV
MIICbjCCAdcCCQCahKvPuKcqtTANBgkqhkiG9w0BAQUFADB6MQswCQYDVQQGEwJV
UzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAO
BgNVBAsTB05vZGUuanMxDDAKBgNVBAMTA2NhMTEgMB4GCSqGSIb3DQEJARYRcnlA
dGlueWNsb3Vkcy5vcmcwHhcNMTEwMzE0MTgyOTEyWhcNMzgwNzI5MTgyOTEyWjB9
dGlueWNsb3Vkcy5vcmcwHhcNMTMwODAxMTExODU5WhcNNDAxMjE2MTExODU5WjB9
MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQK
EwZKb3llbnQxEDAOBgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MTEgMB4G
CSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwXDANBgkqhkiG9w0BAQEFAANL
ADBIAkEAnzpAqcoXZxWJz/WFK7BXwD23jlREyG11x7gkydteHvn6PrVBbB5yfu6c
bk8w3/Ar608AcyMQ9vHjkLQKH7cjEQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAKha
HqjCfTIut+m/idKy3AoFh48tBHo3p9Nl5uBjQJmahKdZAaiksL24Pl+NzPQ8LIU+
FyDHFp6OeJKN6HzZ72Bh9wpBVu6Uj1hwhZhincyTXT80wtSI/BoUAW8Ls2kwPdus
64LsJhhxqj2m4vPKNRbHB2QxnNrGi30CUf3kt3Ia
CSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwgZ8wDQYJKoZIhvcNAQEBBQAD
gY0AMIGJAoGBAMNQTWAcktNJlmpEbu0xKJzjpI0MJfWZauUg5GXD6/CXRGOEQ/Im
uqG7Ar23LrFK/y2goHCF+/ffJKaFzJ4iuv2nAlly/HTriQJUtP/dxacfqrC5A1GH
EYAA/S1VShPUtpljADZWyEemWBzZacC2SQ5cChkXTmqJ9t3wYBSw/guHAgMBAAEw
DQYJKoZIhvcNAQEFBQADgYEAbuPFhXlMbdYX0XpcPiiRamvO2Qha2GEBRSfqg1Qe
fZo5oRXlOd+QVh4O8A3AFY06ERKE72Ho01B+KM2MwpJk0izQhmC4a0pks0jrBuyW
dGoVczyK8eCtbw3Y2uiALV+60EidhCbOqml+3kIDVF0cXkCYi5FVbHRTls7wL0gR
Fe0=
-----END CERTIFICATE-----
17 changes: 10 additions & 7 deletions test/fixtures/keys/agent1-csr.pem
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
-----BEGIN CERTIFICATE REQUEST-----
MIIBXTCCAQcCAQAwfTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMQswCQYDVQQH
MIIB4jCCAUsCAQAwfTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMQswCQYDVQQH
EwJTRjEPMA0GA1UEChMGSm95ZW50MRAwDgYDVQQLEwdOb2RlLmpzMQ8wDQYDVQQD
EwZhZ2VudDExIDAeBgkqhkiG9w0BCQEWEXJ5QHRpbnljbG91ZHMub3JnMFwwDQYJ
KoZIhvcNAQEBBQADSwAwSAJBAJ86QKnKF2cVic/1hSuwV8A9t45URMhtdce4JMnb
Xh75+j61QWwecn7unG5PMN/wK+tPAHMjEPbx45C0Ch+3IxECAwEAAaAlMCMGCSqG
SIb3DQEJBzEWExRBIGNoYWxsZW5nZSBwYXNzd29yZDANBgkqhkiG9w0BAQUFAANB
AF+AfG64hNyYHum46m6i7RgnUBrJSOynGjs23TekV4he3QdMSAAPPqbll8W14+y3
vOo7/yQ2v2uTqxCjakUNPPs=
EwZhZ2VudDExIDAeBgkqhkiG9w0BCQEWEXJ5QHRpbnljbG91ZHMub3JnMIGfMA0G
CSqGSIb3DQEBAQUAA4GNADCBiQKBgQDDUE1gHJLTSZZqRG7tMSic46SNDCX1mWrl
IORlw+vwl0RjhEPyJrqhuwK9ty6xSv8toKBwhfv33ySmhcyeIrr9pwJZcvx064kC
VLT/3cWnH6qwuQNRhxGAAP0tVUoT1LaZYwA2VshHplgc2WnAtkkOXAoZF05qifbd
8GAUsP4LhwIDAQABoCUwIwYJKoZIhvcNAQkHMRYTFEEgY2hhbGxlbmdlIHBhc3N3
b3JkMA0GCSqGSIb3DQEBBQUAA4GBAFRwfX09wCEqB5fOGTLSAQqK7/Tm47t8TcFy
PsCoHcYSHCSSthknJgdnK9nQaVVVqVpDRgmUFmcWC27JOAFQLt79FqOYNLGrmvR/
ZaRbz3BBi4TBHClalnyBBzaYJJQz16qbT4j48TmzRQvBGR/gT2FpPoLVDWKU+U6E
oU6hMCpb
-----END CERTIFICATE REQUEST-----
20 changes: 13 additions & 7 deletions test/fixtures/keys/agent1-key.pem
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
-----BEGIN RSA PRIVATE KEY-----
MIIBOwIBAAJBAJ86QKnKF2cVic/1hSuwV8A9t45URMhtdce4JMnbXh75+j61QWwe
cn7unG5PMN/wK+tPAHMjEPbx45C0Ch+3IxECAwEAAQJBAI2cU1IuR+4IO87WPyAB
76kruoo87AeNQkjjvuQ/00+b/6IS45mcEP5Kw0NukbqBhIw2di9uQ9J51DJ/ZfQr
+YECIQDUHaN3ZjIdJ7/w8Yq9Zzz+3kY2F/xEz6e4ftOFW8bY2QIhAMAref+WYckC
oECgOLAvAxB1lI4j7oCbAaawfxKdnPj5AiEAi95rXx09aGpAsBGmSdScrPdG1v6j
83/2ebrvoZ1uFqkCIB0AssnrRVjUB6GZTNTyU3ERfdkx/RX1zvr8WkFR/lXpAiB7
cUZ1i8ZkZrPrdVgw2cb28UJM7qZHQnXcMHTXFFvxeQ==
MIICXAIBAAKBgQDDUE1gHJLTSZZqRG7tMSic46SNDCX1mWrlIORlw+vwl0RjhEPy
JrqhuwK9ty6xSv8toKBwhfv33ySmhcyeIrr9pwJZcvx064kCVLT/3cWnH6qwuQNR
hxGAAP0tVUoT1LaZYwA2VshHplgc2WnAtkkOXAoZF05qifbd8GAUsP4LhwIDAQAB
AoGAJI+nrFIs+fhQe9wLl8MYAyZp6y1W/b6WUAX0O0iNph/q4WYlAfNWBGhpfvIH
f5C2a+ghoG60WBYhWjq5rvB5aCX/DchIATuaVHgaWcBf7y9NXnWDH9JMtDOTaVI6
s7inJwjqIJAHbloa82NGuwz/EN4Ncng6wTmf1gbF6UtOqGECQQD15UNAtpRqpGPz
xPAZwT3TkY4gYLlZvqn21r/92P5XVbTJXyBTo9pwY4F7o/pNZAQcq3sPUrZW7T4X
t8nPT4RrAkEAy1bvewVS3U10V8ffzCl7F5WiaTEMa39F4e0QqBKOXdnDS2T1FJZl
VSVSXiVMd4qFQf4IVgBZCwihS1hpPSo8VQJBAL7vpBY27+4S8k4SaUIGbITBLHR1
xtcqFv5F6NUrTuvv8C7Bf++Sdwb4LU4dmTnI5OyCN09Bsba0B5gRLVKd8zsCQAu4
AetEHkd0zEy2zzYT+e0dCZQoaH/VgPCJWhlloGDWSQQSWHGMTWC/2uRkH+kPyahI
/LAAKyGQqMMP4FjPE1UCQAyPkF3dJy+KRZSQ2rz0bpBVGoUV31hl+SvMigCy0yUy
QwvJxgN14LQJP+pCcuJGaSdiPsOjxqhPX7KMg3SiSlA=
-----END RSA PRIVATE KEY-----
17 changes: 10 additions & 7 deletions test/fixtures/keys/agent2-cert.pem
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
-----BEGIN CERTIFICATE-----
MIIB7DCCAZYCCQC7gs0MDNn6MTANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJV
MIICcTCCAdoCCQDTgzSLdDTF0TANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJV
UzELMAkGA1UECBMCQ0ExCzAJBgN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N6/kVXY/EspwWJcLbJ5jdsDmkRbV52hX
Th4jkAI=
-----END CERTIFICATE-----
17 changes: 10 additions & 7 deletions test/fixtures/keys/agent2-csr.pem
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
-----BEGIN CERTIFICATE REQUEST-----
MIIBXTCCAQcCAQAwfTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMQswCQYDVQQH
MIIB4jCCAUsCAQAwfTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMQswCQYDVQQH
EwJTRjEPMA0GA1UEChMGSm95ZW50MRAwDgYDVQQLEwdOb2RlLmpzMQ8wDQYDVQQD
EwZhZ2VudDIxIDAeBgkqhkiG9w0BCQEWEXJ5QHRpbnljbG91ZHMub3JnMFwwDQYJ
KoZIhvcNAQEBBQADSwAwSAJBAMl2/Ba0XSm4ayi4C0rJ+tYtQu8O31VVXezkLJlf
+6fVgdpVhYg5QlihlPUoiM/wOsDWQ1ALnNhPlcLaQk+etQECAwEAAaAlMCMGCSqG
SIb3DQEJBzEWExRBIGNoYWxsZW5nZSBwYXNzd29yZDANBgkqhkiG9w0BAQUFAANB
AJnll2pt5l0pzskQSpjjLVTlFDFmJr/AZ3UK8v0WxBjYjCe5Jx4YehkChpxIyDUm
U3J9q9MDUf0+Y2+EGkssFfk=
EwZhZ2VudDIxIDAeBgkqhkiG9w0BCQEWEXJ5QHRpbnljbG91ZHMub3JnMIGfMA0G
CSqGSIb3DQEBAQUAA4GNADCBiQKBgQChmEZ7tgXWNkfH5aijyyAljv+zaEVRh+Cm
QWNbgRf1WF8gNlU+Tu+OtZreqAN+9gSLRsjcXWzBL0AUXC4l07niheQ/imLt9G1n
pugPwMcWL56lOLT/robFzbhjUE6fItLwQzP51Me0Bnj9SnWugvd+jwjbe8Gxjyjz
cgAjTG56bQIDAQABoCUwIwYJKoZIhvcNAQkHMRYTFEEgY2hhbGxlbmdlIHBhc3N3
b3JkMA0GCSqGSIb3DQEBBQUAA4GBAEBfLsByEqL79HRr4QwPTARMW51ohh29kCUU
OunEyxM8Ti3lBPGOePXLBGjq6e/eLmoOfKsOXKjE+Z3Rpj2L0IKJgpBBcvD2BCyM
920PdvIHHgWXGSGiDGL/nMbX3SZrYNP/ERawg/Tzqh4QorPj91RKYez9NNLoOncm
Ug1MI/t9
-----END CERTIFICATE REQUEST-----
20 changes: 13 additions & 7 deletions test/fixtures/keys/agent2-key.pem
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
-----BEGIN RSA PRIVATE KEY-----
MIIBOgIBAAJBAMl2/Ba0XSm4ayi4C0rJ+tYtQu8O31VVXezkLJlf+6fVgdpVhYg5
QlihlPUoiM/wOsDWQ1ALnNhPlcLaQk+etQECAwEAAQJBAMT6Bf34+UHKY1ObpsbH
9u2jsVblFq1rWvs8GPMY6oertzvwm3DpuSUp7PTgOB1nLTLYtCERbQ4ovtN8tn3p
OHUCIQDzIEGsoCr5vlxXvy2zJwu+fxYuhTZWMVuo1397L0VyhwIhANQh+yzqUgaf
WRtSB4T2W7ADtJI35ET61jKBty3CqJY3AiAIwju7dVW3A5WeD6Qc1SZGKZvp9yCb
AFI2BfVwwaY11wIgXF3PeGcvACMyMWsuSv7aPXHfliswAbkWuzcwA4TW01ECIGWa
cgsDvVFxmfM5NPSuT/UDTa6R5BFISB5ea0N0AR3I
MIICXQIBAAKBgQChmEZ7tgXWNkfH5aijyyAljv+zaEVRh+CmQWNbgRf1WF8gNlU+
Tu+OtZreqAN+9gSLRsjcXWzBL0AUXC4l07niheQ/imLt9G1npugPwMcWL56lOLT/
robFzbhjUE6fItLwQzP51Me0Bnj9SnWugvd+jwjbe8GxjyjzcgAjTG56bQIDAQAB
AoGAd19C6g5731N30T5hRqY+GCC72a90TZc/p/Fz0Vva8/4VP3mDnSS4qMaVIlgh
RP++OZjPtqI5PbiG8MNrv7vZe0UXlV7oZE0IA+jomUXsplbwMFf6pkrqdyHi+cbm
rBudhmKeLUgNA6peMGVA83C5g2SMqU5kB+tWzZT7Rs9rsyECQQDWpXxZgULqbFZv
wjpIDGWjOpQZrv123bJ9TQ+VoskCu4vlyDJqDJPwnscl8NnzpFJriDARn0WrB2sd
8GCX1yEpAkEAwLo/MYG5elkNRsE5/vINSIo04Gu6tP/Sd7EBtHYAPHUPjs/MhhVX
tMIGtACheHMwjGRPyr8pboEp2LEap4GjpQJBALNsy+CJ0+TfwPVU96EIc+GZcvlx
NMErGyvwwclEtSDKo2vmCHZrozLtlu1ZQueOgbMPuZbRe8w2vEzfhe8HTtkCQAYy
NrPlwsvPLyEWN0IeEBVD9D0+2WrWSrL0auSdYpaPAOgLgDzTVNWH42VIG+jeczIg
S3xuNuvJlUnVL9Ew1s0CQQCly+gduXtvOYip1/Stm/65kT7d8ICQgjh0XSPw/kUC
llVMQY3z1iFCaj/z0Csr0t0kJ534bH7GP3LOoNruV0p9
-----END RSA PRIVATE KEY-----
18 changes: 10 additions & 8 deletions test/fixtures/keys/agent3-cert.pem
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
-----BEGIN CERTIFICATE-----
MIICKjCCAZMCCQCDBr594bsJmTANBgkqhkiG9w0BAQUFADB6MQswCQYDVQQGEwJV
MIICbjCCAdcCCQDuvizlIRoS9jANBgkqhkiG9w0BAQUFADB6MQswCQYDVQQGEwJV
UzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAO
BgNVBAsTB05vZGUuanMxDDAKBgNVBAMTA2NhMjEgMB4GCSqGSIb3DQEJARYRcnlA
dGlueWNsb3Vkcy5vcmcwHhcNMTEwMzE0MTgyOTEyWhcNMzgwNzI5MTgyOTEyWjB9
dGlueWNsb3Vkcy5vcmcwHhcNMTMwODAxMTExOTAwWhcNNDAxMjE2MTExOTAwWjB9
MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQK
EwZKb3llbnQxEDAOBgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MzEgMB4G
CSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwXDANBgkqhkiG9w0BAQEFAANL
ADBIAkEAtlNDZ+bHeBI0B2gD/IWqA7Aq1hwsnS4+XpnLesjTQcL2JwFFpkR0oWrw
yjrYhCogi7c5gjKrLZF1d2JD5JgHgQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAJoK
bXwsImk7vJz9649yrmsXwnuGbEKVYMvqcGyjaZNP9lYEG41y5CeRzxhWy2rlYdhE
f2nqE2lg75oJP7LQqfQY7aCqwahM3q/GQbsfKVCGjF7TVyq9TQzd8iW+FEJIQzSE
3aN85hR67+3VAXeSzmkGSVBO2m1SJIug4qftIkc2
CSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwgZ8wDQYJKoZIhvcNAQEBBQAD
gY0AMIGJAoGBAM8KaJS9K/7LKuV1c8Jsliy9o3ubBGHGguBLmtHLgsAhsvbB/lE7
cuxbBXPHLgegopcOrbsp4EuHURcN2WAkGcXpBIE5msYOxmImy2FifuUi0Vj4b2Ey
cpmkADXZrAOygwPw3WH16wNlR/vsL1GFubQ6EIdK4gv9fhBBdMFKm7LRAgMBAAEw
DQYJKoZIhvcNAQEFBQADgYEAQJHyY0ghxICN5uu8GC9YRygzhiW/6xwKiHTQf9gH
pET7LrJZhWmAFh19z9CEgvyWe7RQ8SfjHJX3fFZPNIO3OPYWuY+kr6wudBXrcnAj
XLOj050lMSv3KVWI/TerEDPX1nR+rA2xzp73iJ/SC77Q02JZcVysoBB056nuHp38
WNI=
-----END CERTIFICATE-----
17 changes: 10 additions & 7 deletions test/fixtures/keys/agent3-csr.pem
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
-----BEGIN CERTIFICATE REQUEST-----
MIIBXTCCAQcCAQAwfTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMQswCQYDVQQH
MIIB4jCCAUsCAQAwfTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMQswCQYDVQQH
EwJTRjEPMA0GA1UEChMGSm95ZW50MRAwDgYDVQQLEwdOb2RlLmpzMQ8wDQYDVQQD
EwZhZ2VudDMxIDAeBgkqhkiG9w0BCQEWEXJ5QHRpbnljbG91ZHMub3JnMFwwDQYJ
KoZIhvcNAQEBBQADSwAwSAJBALZTQ2fmx3gSNAdoA/yFqgOwKtYcLJ0uPl6Zy3rI
00HC9icBRaZEdKFq8Mo62IQqIIu3OYIyqy2RdXdiQ+SYB4ECAwEAAaAlMCMGCSqG
SIb3DQEJBzEWExRBIGNoYWxsZW5nZSBwYXNzd29yZDANBgkqhkiG9w0BAQUFAANB
AEGo76iH+a8pnE+RWQT+wg9/BL+iIuqrcFXLs0rbGonqderrwXAe15ODwql/Bfu3
zgMt8ooTsgMPcMX9EgmubEM=
EwZhZ2VudDMxIDAeBgkqhkiG9w0BCQEWEXJ5QHRpbnljbG91ZHMub3JnMIGfMA0G
CSqGSIb3DQEBAQUAA4GNADCBiQKBgQDPCmiUvSv+yyrldXPCbJYsvaN7mwRhxoLg
S5rRy4LAIbL2wf5RO3LsWwVzxy4HoKKXDq27KeBLh1EXDdlgJBnF6QSBOZrGDsZi
JsthYn7lItFY+G9hMnKZpAA12awDsoMD8N1h9esDZUf77C9Rhbm0OhCHSuIL/X4Q
QXTBSpuy0QIDAQABoCUwIwYJKoZIhvcNAQkHMRYTFEEgY2hhbGxlbmdlIHBhc3N3
b3JkMA0GCSqGSIb3DQEBBQUAA4GBAKcTs/vSdImZFlC0sBzFjqofQJI8uDZrOhkh
Stv3k0TmlRB51zSFlOmb0ReZa3JyUzOkpvx1nIl6HeZ1lZFZhAr2WCib31H7iJF/
rbUpCjqQ9gBXSaXxQ6QkJSIEjM+QRiDiRQ7Uphq5qsa9uzGTJI9Jv/Ej8h2pYfRD
eDO3k0+c
-----END CERTIFICATE REQUEST-----
20 changes: 13 additions & 7 deletions test/fixtures/keys/agent3-key.pem
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@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TYWrXzZLALhDZ7X8l49zwTAvP77sId08ezr3yECQQCV
Cvw1Ze5pEirpn+Fnd1YH4z9SCn1phN5wwlf/1gb7uhTQGBx1mJ/ttpQT3tQ6vpXq
7yE3X6PwPZbY69iNr8F3AkBbymGXgt66Lv7gdea0UlRFjEWhuP2OC0WOtg4entvZ
1KHxsgMNIrYoPjvPq/3ReCZapnKpQfMuR564BCOY4bnX
-----END RSA PRIVATE KEY-----
21 changes: 11 additions & 10 deletions test/fixtures/keys/agent4-cert.pem
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
-----BEGIN CERTIFICATE-----
MIICSDCCAbGgAwIBAgIJAIMGvn3huwmaMA0GCSqGSIb3DQEBBQUAMHoxCzAJBgNV
MIICjDCCAfWgAwIBAgIJAO6+LOUhGhL3MA0GCSqGSIb3DQEBBQUAMHoxCzAJBgNV
BAYTAlVTMQswCQYDVQQIEwJDQTELMAkGA1UEBxMCU0YxDzANBgNVBAoTBkpveWVu
dDEQMA4GA1UECxMHTm9kZS5qczEMMAoGA1UEAxMDY2EyMSAwHgYJKoZIhvcNAQkB
FhFyeUB0aW55Y2xvdWRzLm9yZzAeFw0xMTAzMTQxODI5MTJaFw0zODA3MjkxODI5
MTJaMH0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTELMAkGA1UEBxMCU0YxDzAN
FhFyeUB0aW55Y2xvdWRzLm9yZzAeFw0xMzA4MDExMTE5MDFaFw00MDEyMTYxMTE5
MDFaMH0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTELMAkGA1UEBxMCU0YxDzAN
BgNVBAoTBkpveWVudDEQMA4GA1UECxMHTm9kZS5qczEPMA0GA1UEAxMGYWdlbnQ0
MSAwHgYJKoZIhvcNAQkBFhFyeUB0aW55Y2xvdWRzLm9yZzBcMA0GCSqGSIb3DQEB
AQUAA0sAMEgCQQDN/yMfmQ8zdvmjlGk7b3Mn6wY2FjaMb4c5ENJX15vyYhKS1zhx
6n0kQIn2vf6yqG7tO5Okz2IJiD9Sa06mK6GrAgMBAAGjFzAVMBMGA1UdJQQMMAoG
CCsGAQUFBwMCMA0GCSqGSIb3DQEBBQUAA4GBAA8FXpRmdrHBdlofNvxa14zLvv0N
WnUGUmxVklFLKXvpVWTanOhVgI2TDCMrT5WvCRTD25iT1EUKWxjDhFJrklQJ+IfC
KC6fsgO7AynuxWSfSkc8/acGiAH+20vW9QxR53HYiIDMXEV/wnE0KVcr3t/d70lr
ImanTrunagV+3O4O
MSAwHgYJKoZIhvcNAQkBFhFyeUB0aW55Y2xvdWRzLm9yZzCBnzANBgkqhkiG9w0B
AQEFAAOBjQAwgYkCgYEAmRNV3/oxV+YEXxo0wXHbA45gm4SyPhxlxi0ZXd4Xasmu
D2u4G57LV3uuEQ7fT34OhiOm1zr/Mv5IE8d3d0upRjpFUru45zxKg4nbqO1e07jM
2Yq5awwfk8BZpo7BEYVZ6SOiJO+tq/RFCPoTtjagwsDgUqHw9W7oVxXWeU0NmmMC
AwEAAaMXMBUwEwYDVR0lBAwwCgYIKwYBBQUHAwIwDQYJKoZIhvcNAQEFBQADgYEA
Ll7QpD8qb6+BshGdca+SBV6lGhQBDYV6BIwU7V6LIsMkyoSLXVO59sdahtLMI9zv
pIE3IIVztY5/kBLYQxIfR+a1lL4/jraHrZp3mRTyh0nzgT567k+EeD2Q4UG+eDkM
hcEXm5jGqOm/sMC1Jx/JUIeI3RF2TuV5OhR5Y94tMjM=
-----END CERTIFICATE-----
17 changes: 10 additions & 7 deletions test/fixtures/keys/agent4-csr.pem
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
-----BEGIN CERTIFICATE REQUEST-----
MIIBXTCCAQcCAQAwfTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMQswCQYDVQQH
MIIB4jCCAUsCAQAwfTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMQswCQYDVQQH
EwJTRjEPMA0GA1UEChMGSm95ZW50MRAwDgYDVQQLEwdOb2RlLmpzMQ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