fix initial jwk

This commit is contained in:
lastlink 2019-05-07 11:47:59 -04:00
parent 037b8489f6
commit 0355354654
2 changed files with 4 additions and 4 deletions

4
app.js
View File

@ -128,7 +128,7 @@
$$('button').map(function ($el) { $el.disabled = true; }); $$('button').map(function ($el) { $el.disabled = true; });
var opts = { var opts = {
jwk: JSON.parse($('textarea[name="JWK"]').value), jwk: JSON.parse($('textarea[name="jwk"]').value),
claims: { claims: {
exp: "1h", exp: "1h",
iss: document.getElementById(`-acmeDomains`).value iss: document.getElementById(`-acmeDomains`).value
@ -165,7 +165,7 @@
$('.js-generate').hidden = false; $('.js-generate').hidden = false;
$('.js-sign').hidden = false; $('.js-sign').hidden = false;
$('textarea[name="JWK"]').value = JSON.stringify({ $('textarea[name="jwk"]').value = JSON.stringify({
"crv": "P-256", "crv": "P-256",
"d": "LImWxqqTHbP3LHQfqscDSUzf_uNePGqf9U6ETEcO5Ho", "d": "LImWxqqTHbP3LHQfqscDSUzf_uNePGqf9U6ETEcO5Ho",
"kty": "EC", "kty": "EC",

View File

@ -97,9 +97,9 @@
<input class="js-domains" type="text" id="-acmeDomains" value="example.com www.example.com"> <input class="js-domains" type="text" id="-acmeDomains" value="example.com www.example.com">
</div> </div>
<div> <div>
<label for="pem">JWK:</label> <label for="jwk">JWK:</label>
<br> <br>
<textarea id="pem" name="pem"></textarea> <textarea id="jwk" name="jwk"></textarea>
</div> </div>
<button class="js-sign" hidden>Sign</button> <button class="js-sign" hidden>Sign</button>
</form> </form>