Compare commits

..

No commits in common. "5afd9396537193946c8bcb9fadc467944d892eb9" and "ceec79275d33edc089b86d3136c9e2aa1934cfdd" have entirely different histories.

3 changed files with 35 additions and 39 deletions

View File

@ -118,9 +118,9 @@ Greenlock.create = function (gl) {
console.warn("");
console.warn("");
console.warn("");
console.warn("==========================================================");
console.warn("====================================================================");
console.warn("== greenlock.js (v2.2.0+) ==");
console.warn("==========================================================");
console.warn("====================================================================");
console.warn("");
console.warn("Please specify 'version' option:");
console.warn("");
@ -131,7 +131,10 @@ Greenlock.create = function (gl) {
console.warn("");
console.warn(" 'v01' for Let's Encrypt v1 (deprecated)");
console.warn("");
console.warn("This will be required in versions v2.3+");
console.warn("====================================================================");
console.warn("== this will be required from version v2.3 forward ==");
console.warn("====================================================================");
console.warn("");
console.warn("");
console.warn("");
} else if ('v02' === gl.version) {
@ -143,29 +146,29 @@ Greenlock.create = function (gl) {
if (!gl.server) {
throw new Error("opts.server must specify an ACME directory URL, such as 'https://acme-staging-v02.api.letsencrypt.org/directory'");
}
if ('staging' === gl.server || 'production' === gl.server) {
if ('staging' === gl.server) {
gl.server = 'https://acme-staging.api.letsencrypt.org/directory';
gl.version = 'v01';
gl._deprecatedServerName = 'staging';
}
else if ('production' === gl.server) {
gl.server = 'https://acme-v01.api.letsencrypt.org/directory';
gl.version = 'v01';
gl._deprecatedServerName = 'production';
}
console.warn("");
console.warn("");
console.warn("=== WARNING ===");
console.warn("");
console.warn("Due to versioning issues the '" + gl._deprecatedServerName + "' option is deprecated.");
console.warn("Please specify the full url and version.");
console.warn("Due to versioning issues the 'staging' option is deprecated. Please specify the full url and version.");
console.warn("");
console.warn("For APIs add:");
console.warn("\t, \"version\": \"" + gl.version + "\"");
console.warn("\t, \"server\": \"" + gl.server + "\"");
console.warn("\t--acme-url '" + gl.server + "' \\");
console.warn("\t--acme-version '" + gl.version + "' \\");
console.warn("");
console.warn("");
}
else if ('production' === gl.server) {
gl.server = 'https://acme-v01.api.letsencrypt.org/directory';
gl.version = 'v01';
console.warn("");
console.warn("");
console.warn("=== WARNING ===");
console.warn("");
console.warn("Due to versioning issues the 'production' option is deprecated. Please specify the full url and version.");
console.warn("");
console.warn("For the CLI add:");
console.warn("\t--acme-url '" + gl.server + "' \\");
console.warn("\t--acme-version '" + gl.version + "' \\");
console.warn("");
@ -176,22 +179,19 @@ Greenlock.create = function (gl) {
console.warn("");
console.warn("=== WARNING ===");
console.warn("");
console.warn("Let's Encrypt v1 is deprecated.");
console.warn("Please update to Let's Encrypt v2 (ACME draft 11)");
console.warn("Let's Encrypt v1 is deprecated. Please update to Let's Encrypt v2 (ACME draft 11)");
console.warn("");
try {
return require('le-acme-core').ACME;
} catch(e) {
console.error("");
console.error("=== Error (easy-to-fix) ===");
console.error("");
console.error("Hey, this isn't a big deal, but you need to manually add v1 support:");
console.error("");
console.error(" npm install --save le-acme-core");
console.error("");
console.error("Just run that real quick, restart, and everything will work great.");
console.error("");
console.error("");
console.error(e);
console.info("");
console.info("");
console.info("If you require v01 API support (which is deprecated), you must install it:");
console.info("");
console.info("\tnpm install le-acme-core");
console.info("");
console.info("");
process.exit(e.code || 13);
}
}

View File

@ -91,7 +91,6 @@ module.exports.create = function (gl) {
return gl.acme.registerNewAccountAsync({
email: args.email
, newRegUrl: args._acmeUrls.newReg
, newAuthzUrl: args._acmeUrls.newAuthz
, agreeToTerms: function (tosUrl, agreeCb) {
if (true === args.agreeTos || tosUrl === args.agreeTos || tosUrl === gl.agreeToTerms) {
agreeCb(null, tosUrl);
@ -111,8 +110,6 @@ module.exports.create = function (gl) {
keypair: keypair
, receipt: receipt
, email: args.email
, newRegUrl: args._acmeUrls.newReg
, newAuthzUrl: args._acmeUrls.newAuthz
};
// TODO move templating of arguments to right here?

View File

@ -1,6 +1,6 @@
{
"name": "greenlock",
"version": "2.2.17",
"version": "2.2.16",
"description": "Let's Encrypt for node.js on npm",
"main": "index.js",
"scripts": {
@ -58,8 +58,7 @@
"request": "^2.75.0"
},
"optionalDependencies": {
"bluebird": "^3.5.1",
"le-acme-core": "^2.1.3"
"bluebird": "^3.5.1"
},
"dependencies": {
"acme-v2": "^1.0.6",