remove superflouous key creation

This commit is contained in:
Philipp Kunz 2016-11-17 13:32:16 +01:00
parent 4dc88996e5
commit f15f6811e7
2 changed files with 3 additions and 9 deletions

View File

@ -44,9 +44,6 @@ class SmartAcme {
createAccount() {
let done = q.defer();
this.prepareAcme()
.then(() => {
return this.createKeyPair();
})
.then(() => {
let options = {
newRegUrl: this.acmeUrls.newReg,
@ -64,7 +61,7 @@ class SmartAcme {
done.reject(err);
}
done.resolve(regr);
}); // returns "regr" registration data
});
}).catch(err => { console.log(err); });
return done.promise;
}
@ -101,4 +98,4 @@ class SmartAcme {
}
}
exports.SmartAcme = SmartAcme;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRhY21lLmNsYXNzZXMuc21hcnRhY21lLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRhY21lLmNsYXNzZXMuc21hcnRhY21lLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSwwQkFBdUI7QUFDdkIsdUJBQXNCO0FBTXRCLElBQUksSUFBSSxHQUFHLE9BQU8sQ0FBQyxjQUFjLENBQUMsQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFLENBQUE7QUFDaEQsSUFBSSxHQUFHLEdBQUcsT0FBTyxDQUFDLFlBQVksQ0FBQyxDQUFDLEdBQUcsQ0FBQTtBQUVuQyxJQUFJLE1BQU0sR0FBRyxJQUFJLENBQUE7QUFDakIsSUFBSSxHQUFHLEdBQUcsS0FBSyxDQUFBO0FBQ2YsSUFBSSxPQUFPLEdBQUc7SUFDVixNQUFNLEVBQUUsSUFBSTtJQUNaLEdBQUcsRUFBRSxJQUFJO0lBQ1QsUUFBUSxFQUFFLElBQUk7Q0FDakIsQ0FBQTtBQUNEOztHQUVHO0FBQ0g7SUFLSSxZQUFZLGdCQUF5QixLQUFLO1FBSjFDLGlCQUFZLEdBQVksS0FBSyxDQUFBO1FBS3pCLElBQUksQ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FRLENBQUMsQ0FBQTtZQUMxQixJQUFJLENBQUMsT0FBTyxFQUFFLENBQUE7UUFDbEIsQ0FBQyxDQUFDLENBQUE7UUFDRixNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQTtJQUN2QixDQUFDO0NBQ0o7QUExRkQsOEJBMEZDIn0=

View File

@ -53,9 +53,6 @@ export class SmartAcme {
createAccount() {
let done = q.defer()
this.prepareAcme()
.then(() => {
return this.createKeyPair()
})
.then(() => {
let options = {
newRegUrl: this.acmeUrls.newReg,
@ -73,7 +70,7 @@ export class SmartAcme {
done.reject(err)
}
done.resolve(regr)
}) // returns "regr" registration data
})
}).catch(err => { console.log(err) })
return done.promise