backwards compat
This commit is contained in:
parent
ee48f4a477
commit
3bab5857dd
|
@ -358,10 +358,18 @@ module.exports.create = function (deps) {
|
||||||
return handleErr(new Error("options.newCertUrl must be the new certificate url"));
|
return handleErr(new Error("options.newCertUrl must be the new certificate url"));
|
||||||
}
|
}
|
||||||
if (!options.accountKeypair) {
|
if (!options.accountKeypair) {
|
||||||
return handleErr(new Error("options.accountKeypair must be an object with `privateKeyPem` and/or `privateKeyJwk`"));
|
if (!options.accountPrivateKeyPem) {
|
||||||
|
return handleErr(new Error("options.accountKeypair must be an object with `privateKeyPem` and/or `privateKeyJwk`"));
|
||||||
|
}
|
||||||
|
console.warn("'accountPrivateKeyPem' is deprecated. Use options.accountKeypair.privateKeyPem instead.");
|
||||||
|
options.accountKeypair = RSA.import({ privateKeyPem: options.accountPrivateKeyPem });
|
||||||
}
|
}
|
||||||
if (!options.domainKeypair) {
|
if (!options.domainKeypair) {
|
||||||
return handleErr(new Error("options.domainKeypair must be an object with `privateKeyPem` and/or `privateKeyJwk`"));
|
if (!options.domainPrivateKeyPem) {
|
||||||
|
return handleErr(new Error("options.domainKeypair must be an object with `privateKeyPem` and/or `privateKeyJwk`"));
|
||||||
|
}
|
||||||
|
console.warn("'domainPrivateKeyPem' is deprecated. Use options.domainKeypair.privateKeyPem instead.");
|
||||||
|
options.domainKeypair = RSA.import({ privateKeyPem: options.domainPrivateKeyPem });
|
||||||
}
|
}
|
||||||
if (!options.setChallenge) {
|
if (!options.setChallenge) {
|
||||||
return handleErr(new Error("options.setChallenge must be function(hostname, challengeKey, tokenValue, done) {}"));
|
return handleErr(new Error("options.setChallenge must be function(hostname, challengeKey, tokenValue, done) {}"));
|
||||||
|
|
|
@ -104,7 +104,11 @@ module.exports.create = function (deps) {
|
||||||
var state = {};
|
var state = {};
|
||||||
|
|
||||||
if (!options.accountKeypair) {
|
if (!options.accountKeypair) {
|
||||||
return handleErr(new Error("options.accountKeypair must be an object with `privateKeyPem` and/or `privateKeyJwk`"));
|
if (!options.accountPrivateKeyPem) {
|
||||||
|
return handleErr(new Error("options.accountKeypair must be an object with `privateKeyPem` and/or `privateKeyJwk`"));
|
||||||
|
}
|
||||||
|
console.warn("'accountPrivateKeyPem' is deprecated. Use options.accountKeypair.privateKeyPem instead.");
|
||||||
|
options.accountKeypair = RSA.import({ privateKeyPem: options.accountPrivateKeyPem });
|
||||||
}
|
}
|
||||||
if (!options.agreeToTerms) {
|
if (!options.agreeToTerms) {
|
||||||
cb(new Error("options.agreeToTerms must be function (tosUrl, fn => (err, true))"));
|
cb(new Error("options.agreeToTerms must be function (tosUrl, fn => (err, true))"));
|
||||||
|
|
Loading…
Reference in New Issue