Skip to content

Commit

Permalink
Adds --type to mobile-id-sign CLI.
Browse files Browse the repository at this point in the history
  • Loading branch information
moll committed Nov 10, 2023
1 parent aaa117d commit 84429ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli/mobile_id_sign_cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Options:
--timemark Get the Estonian BDOC's timemark with OCSP.
--timestamp Get a timestamp on the signature.
--timestamp-url=URL URL for the timestamp server.
--type=MIME Override mime type of file.
`.trimLeft()

module.exports = _.compose(errorify, co.wrap(function*(argv) {
Expand Down Expand Up @@ -63,7 +64,7 @@ module.exports = _.compose(errorify, co.wrap(function*(argv) {

var xades = new Xades(cert, [{
path: path,
type: Mime.lookup(path),
type: args["--type"] || Mime.lookup(path),
hash: yield sha256Stream(Fs.createReadStream(path))
}], {policy: args["--timemark"] ? "bdoc" : null})

Expand Down

0 comments on commit 84429ed

Please sign in to comment.