Skip to content

Commit

Permalink
Removed warning on decrypt, should only warn about encryption at cryp…
Browse files Browse the repository at this point in the history
…t time
  • Loading branch information
davglass committed Mar 11, 2011
1 parent db7a248 commit 5973a05
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ exports.writeApp = function(appname, folder) {
return "." + process.nodester.brand + ".appconfig";
}

var getKey = function() {
var getKey = function(warn) {
var ssh = path.join(process.env.HOME, ".ssh"),
data = '',
keys = [
Expand All @@ -69,7 +69,7 @@ var getKey = function() {
return true;
}
});
if (data === '') {
if (data === '' && warn) {
log.warn('No key file found, encrypt is not going to be strong.');
}

Expand Down Expand Up @@ -105,7 +105,7 @@ var decryptAuth = function(str) {
}

var cryptAuth = function(str) {
var key = getKey();
var key = getKey(true);
str = new Buffer(str).toString('base64');
var c = (new crypto.Cipher).init("aes192", key)
var Crypt = c.update(str, "utf8", "hex");
Expand Down

0 comments on commit 5973a05

Please sign in to comment.