diff --git a/lib/bcrypt.js b/lib/bcrypt.js index a2c0f231df73c2cbc0ebf7d2980710a2645d2322..e78b846c7b405a92dcaa5ad4eb407eb2f17d0116 100644 --- a/lib/bcrypt.js +++ b/lib/bcrypt.js @@ -46,7 +46,7 @@ exports.compare = function(pass, hash, cb) { }) }; -exports.get_rounds = exports.getRounds = function(hash) { +exports.getRounds = function(hash) { return bcrypt.getRounds(hash); }; diff --git a/lib/wsapi/authenticate_user.js b/lib/wsapi/authenticate_user.js index 496b972b335f65c59c033e6bf08e68c2419f833e..97ee9f325a5035cbf21be6eda320e6c478697109 100644 --- a/lib/wsapi/authenticate_user.js +++ b/lib/wsapi/authenticate_user.js @@ -104,7 +104,7 @@ exports.process = function(req, res) { } else { logger.info("bcrypt rounds of password for " + uid + " successfully updated (from " + - bcrypt.get_rounds(hash) + " to " + bcrypt.getRounds(hash) + " to " + config.get('bcrypt_work_factor') + ")"); } }); diff --git a/tests/heartbeat-test.js b/tests/heartbeat-test.js index 6dd5341b4b586f303cc43069fdfbb5046ff8a311..303046d0043034e19696476c7bedd0485bad77b4 100755 --- a/tests/heartbeat-test.js +++ b/tests/heartbeat-test.js @@ -13,7 +13,6 @@ start_stop = require('./lib/start-stop.js'), wsapi = require('./lib/wsapi.js'), db = require('../lib/db.js'), config = require('../lib/configuration.js'), -bcrypt = require('bcrypt'), http = require('http'); var suite = vows.describe('heartbeat'); @@ -58,7 +57,7 @@ start_stop.addStartupBatches(suite); suite.addBatch({ "stopping the browserid process": { topic: function() { - process.kill(parseInt(process.env['BROWSERID_PID'], 10), 'SIGSTOP'); + process.kill(parseInt(process.env['BROWSERID_PID'], 10), 'SIGSTOP'); this.callback(); }, "then doing a deep __heartbeat__ on router": { @@ -88,7 +87,7 @@ suite.addBatch({ }, "but upon SIGCONT": { topic: function(e, code) { - process.kill(parseInt(process.env['BROWSERID_PID'], 10), 'SIGCONT'); + process.kill(parseInt(process.env['BROWSERID_PID'], 10), 'SIGCONT'); this.callback(); }, "a deep heartbeat": { @@ -119,7 +118,7 @@ suite.addBatch({ suite.addBatch({ "stopping the static process": { topic: function() { - process.kill(parseInt(process.env['STATIC_PID'], 10), 'SIGSTOP'); + process.kill(parseInt(process.env['STATIC_PID'], 10), 'SIGSTOP'); this.callback(); }, "then doing a deep __heartbeat__ on router": { @@ -149,7 +148,7 @@ suite.addBatch({ }, "but upon SIGCONT": { topic: function(e, code) { - process.kill(parseInt(process.env['STATIC_PID'], 10), 'SIGCONT'); + process.kill(parseInt(process.env['STATIC_PID'], 10), 'SIGCONT'); this.callback(); }, "a deep heartbeat": { diff --git a/tests/password-bcrypt-update-test.js b/tests/password-bcrypt-update-test.js index 033e9109f29269645e38ae45e1c3476881c14616..49a8e60846417dc2a6771856c5ff77f9f6d3ab86 100755 --- a/tests/password-bcrypt-update-test.js +++ b/tests/password-bcrypt-update-test.js @@ -94,7 +94,7 @@ suite.addBatch({ "is bcrypted with the expected number of rounds": function(err, r) { assert.isNull(err); assert.equal(typeof r, 'string'); - assert.equal(config.get('bcrypt_work_factor'), bcrypt.get_rounds(r)); + assert.equal(config.get('bcrypt_work_factor'), bcrypt.getRounds(r)); } } }); @@ -143,7 +143,7 @@ suite.addBatch({ "its bcrypted with 8 rounds": function(err, r) { assert.isNull(err); assert.equal(typeof r, 'string'); - assert.equal(8, bcrypt.get_rounds(r)); + assert.equal(8, bcrypt.getRounds(r)); } } } diff --git a/tests/password-update-test.js b/tests/password-update-test.js index 98ca7384226b05d41c59f7f245209544bbce2eee..a33ac55680e34f4f5bfc6c2c3c06691b4d77d0a2 100755 --- a/tests/password-update-test.js +++ b/tests/password-update-test.js @@ -12,8 +12,7 @@ vows = require('vows'), start_stop = require('./lib/start-stop.js'), wsapi = require('./lib/wsapi.js'), db = require('../lib/db.js'), -config = require('../lib/configuration.js'), -bcrypt = require('bcrypt'); +config = require('../lib/configuration.js'); var suite = vows.describe('password-length'); diff --git a/tests/session-context-test.js b/tests/session-context-test.js index 6c2fe805a1c2a519ff1a7a9bccb434f018c06e5a..9fbdc8bdd1a7f2297b97c9264af39db64d042427 100755 --- a/tests/session-context-test.js +++ b/tests/session-context-test.js @@ -12,8 +12,7 @@ vows = require('vows'), start_stop = require('./lib/start-stop.js'), wsapi = require('./lib/wsapi.js'), db = require('../lib/db.js'), -config = require('../lib/configuration.js'), -bcrypt = require('bcrypt'); +config = require('../lib/configuration.js'); var suite = vows.describe('session-context'); diff --git a/tests/session-duration-test.js b/tests/session-duration-test.js index a28c7f20f7333e4790dc1621948e06e272a1542b..f40a2f7b068bcbcf89293623ea145fdbb3bae33c 100755 --- a/tests/session-duration-test.js +++ b/tests/session-duration-test.js @@ -14,7 +14,6 @@ start_stop = require('./lib/start-stop.js'), wsapi = require('./lib/wsapi.js'), db = require('../lib/db.js'), config = require('../lib/configuration.js'), -bcrypt = require('bcrypt'), primary = require('./lib/primary.js'), ca = require('../lib/keysigner/ca.js'), jwcrypto = require('jwcrypto'); diff --git a/tests/session-prolong-test.js b/tests/session-prolong-test.js index 2df5cc4d2a2a7e1ad80cb847f233479389f5e9b5..b4348502cdb7d9c2ac01ed389a8787070ff0cd49 100755 --- a/tests/session-prolong-test.js +++ b/tests/session-prolong-test.js @@ -12,8 +12,7 @@ vows = require('vows'), start_stop = require('./lib/start-stop.js'), wsapi = require('./lib/wsapi.js'), db = require('../lib/db.js'), -config = require('../lib/configuration.js'), -bcrypt = require('bcrypt'); +config = require('../lib/configuration.js'); var suite = vows.describe('session-prolong');