diff --git a/lib/httpd.js b/lib/httpd.js index 9a4eeff..480d8b4 100644 --- a/lib/httpd.js +++ b/lib/httpd.js @@ -19,16 +19,7 @@ module.exports.create = function (cli, engine/*, dnsd*/) { if (!subparts[1]) { subparts = [ 'root', 'localhost' ]; // TODO generate new random key and store it - jwk = { - //"kid": "thumbnail(pubkey)", - "kty": "EC", - "d": "GRIT-yJVlhAsgIChbNanxv41iCxbZszbHHgK8kbZovs", - "use": "sig", - "crv": "P-256", - "x": "ogbK2nP6SiEIIp4w8oXBn3dcs6kljFfTbgZYG591tUU", - "y": "sB0AekMYwpvbQfAoW-2LlEWdapNhxynfj1zBtWpE9lo", - "alg": "ES256" - }; + jwk = cli.privkey || require('../samples/privkey.js'); jwt = require('jsonwebtoken'); privpem = require('jwk-to-pem')(jwk, { private: true }); pubpem = require('jwk-to-pem')(jwk, { private: false }); diff --git a/lib/public/index.html b/lib/public/index.html index d9806d0..147dbb5 100644 --- a/lib/public/index.html +++ b/lib/public/index.html @@ -27,11 +27,49 @@