Skip to content
Snippets Groups Projects
Commit f3875465 authored by Lloyd Hilaiel's avatar Lloyd Hilaiel
Browse files

fix regression introduced with jwcrypto upgrade - in-tree example primary was broken - closes #1602

parent 82bf7de2
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@ jwcrypto = require("jwcrypto");
// alg
require("jwcrypto/lib/algs/rs");
require("jwcrypto/lib/algs/ds");
var exampleServer = express.createServer();
......@@ -89,11 +90,9 @@ exampleServer.post("/api/cert_key", function (req, res) {
var expiration = new Date();
var pubkey = jwcrypto.loadPublicKeyFromObject(req.body.pubkey);
expiration.setTime(new Date().valueOf() + req.body.duration * 1000);
jwcrypto.cert.sign(pubkey, {email: user + "@" + domain}, {issuer: domain, expiresAt: expiration, issuedAt: new Date()}, _privkey, function(err, cert) {
jwcrypto.cert.sign(pubkey, {email: user + "@" + domain}, {issuer: domain, expiresAt: expiration, issuedAt: new Date()}, {}, _privKey, function(err, cert) {
res.json({ cert: cert });
});
res.json({ cert: cert });
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment