Skip to content

Commit

Permalink
tls: set timer to plugin.timeout - 1 (was 10s)
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Jun 10, 2014
1 parent 87b71fc commit 5975af8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion config/tls.ini
@@ -1,7 +1,6 @@
; See 'haraka -h tls' ; See 'haraka -h tls'


; ciphers: a list of permitted ciphers ; ciphers: a list of permitted ciphers

ciphers=ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4 ciphers=ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4


; no_tls_hosts - if you find servers with broken TLS, add their IP to this ; no_tls_hosts - if you find servers with broken TLS, add their IP to this
Expand Down
7 changes: 5 additions & 2 deletions plugins/tls.js
Expand Up @@ -90,10 +90,13 @@ exports.hook_unrecognized_command = function (next, connection, params) {
connection.respond(220, "Go ahead."); connection.respond(220, "Go ahead.");


var plugin = this; var plugin = this;
// adjust plugin.timeout like so: echo '45' > config/tls.timeout
var timeout = plugin.timeout - 1;

var timer = setTimeout(function () { var timer = setTimeout(function () {
connection.logerror(plugin, 'timeout'); connection.logerror(plugin, 'timeout');
return next(); return next(DENYSOFTDISCONNECT);
}, 10 * 1000); }, timeout * 1000);


/* Upgrade the connection to TLS. */ /* Upgrade the connection to TLS. */
connection.client.upgrade(plugin.tls_opts, function (authorized, verifyError, cert, cipher) { connection.client.upgrade(plugin.tls_opts, function (authorized, verifyError, cert, cipher) {
Expand Down

0 comments on commit 5975af8

Please sign in to comment.