backwards compat
This commit is contained in:
parent
ee48f4a477
commit
3bab5857dd
|
@ -358,11 +358,19 @@ module.exports.create = function (deps) {
|
|||
return handleErr(new Error("options.newCertUrl must be the new certificate url"));
|
||||
}
|
||||
if (!options.accountKeypair) {
|
||||
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.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) {
|
||||
return handleErr(new Error("options.setChallenge must be function(hostname, challengeKey, tokenValue, done) {}"));
|
||||
}
|
||||
|
|
|
@ -104,8 +104,12 @@ module.exports.create = function (deps) {
|
|||
var state = {};
|
||||
|
||||
if (!options.accountKeypair) {
|
||||
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) {
|
||||
cb(new Error("options.agreeToTerms must be function (tosUrl, fn => (err, true))"));
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue