https: fix renegotation attack protection

Listen for the 'clientError' event that is emitted when a renegotation attack
is detected and close the connection.

Fixes test/pummel/test-https-ci-reneg-attack.js
This commit is contained in:
Ben Noordhuis committed 2012-10-09 16:38:00 +02:00
1 parent 7394e89ff6
commit 0ad005852c
5 files changed
+17 -4

No files matched your search

+4
View File
@@ -39,6 +39,10 @@ function Server(opts, requestListener) {
if (requestListener) {
this.addListener('request', requestListener);
}
this.addListener('clientError', function(err, conn) {
conn.destroy(err);
});
}
inherits(Server, tls.Server);