diff --git a/routes.js b/routes.js index 037cfac..5de1c21 100755 --- a/routes.js +++ b/routes.js @@ -164,11 +164,11 @@ module.exports = function(app, models, mongoose){ return; } - if (!pfxPass || pfxPass === "") { - pfxPass = "password"; + command = "openssl pkcs12 -export -inkey " + names.private + " -out " + names.pfx + " -in " + names.public; + if (pfxPass && pfxPass != "") { + command = command + " -password pass:" + escapeShell(pfxPass); } - command = "openssl pkcs12 -export -inkey " + names.private + " -out " + names.pfx + " -in " + names.public + " -password pass:" + escapeShell(pfxPass); exec(command, function (error, stdout, stderr) { if (error !== null) { @@ -258,4 +258,4 @@ module.exports = function(app, models, mongoose){ } ); }); -}; \ No newline at end of file +}; diff --git a/views/index.jade b/views/index.jade index 04affd3..abb1119 100755 --- a/views/index.jade +++ b/views/index.jade @@ -188,7 +188,7 @@ script }, pfxPass: { minlength: 5, - required: true + required: false }, }, highlight: function(label) {