UNPKG

undersign

Version:

Create eIDAS compatible XAdES digital signatures with certificate OCSP responses and timestamps. Works with the Estonian Id-card and Mobile-Id to create BDOCs, but isn't limited to Estonia.

14 lines (10 loc) 353 B
var fetch = require("fetch-off") fetch = require("fetch-jsonify")(fetch) fetch = require("fetch-parse")(fetch, { json: true, "application/ocsp-response": parseBuffer, "application/timestamp-reply": parseBuffer }) fetch = require("fetch-throw")(fetch) module.exports = fetch function parseBuffer(res) { return res.arrayBuffer().then(Buffer.from) }