From 4b75e58bac32a699f0669eb2b8c3c3516a928d1c Mon Sep 17 00:00:00 2001 From: deuce <> Date: Fri, 23 Feb 2018 12:30:36 +0000 Subject: [PATCH] Fix account creation. --- exec/load/acmev2.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/exec/load/acmev2.js b/exec/load/acmev2.js index c2aeb1a7f6..3e30e1d54b 100644 --- a/exec/load/acmev2.js +++ b/exec/load/acmev2.js @@ -48,8 +48,12 @@ function ACMEv2(opts) this.host = opts.host; this.jws_format = 'sha256'; this.ua = new HTTPRequest(); - if (this.key_id === undefined) - this.get_key_id(); + if (this.key_id === undefined) { + try { + this.get_key_id(); + } + catch(e) {} + } } ACMEv2.prototype.get_key_id = function() @@ -161,7 +165,7 @@ ACMEv2.prototype.post = function(link, data) url = this.get_directory(link)[link]; if (url === undefined) throw('Unknown link name: "'+link+'"'); - return this.post_url(url, data); + return this.post_url(url, data, post_method); } ACMEv2.prototype.get_nonce = function() @@ -258,6 +262,8 @@ ACMEv2.prototype.post_url = function(url, data, post_method) if (post_method === undefined) post_method = 'post_key_id'; +print("URL: "+url); +print("Method: "+post_method); switch(post_method) { case 'post_key_id': protected.nonce = this.get_nonce(); -- GitLab