Skip to content

Commit

Permalink
Revert "plumb through dohash; fix client section"
Browse files Browse the repository at this point in the history
This reverts commit 3363b5c.
  • Loading branch information
maxtaco committed Feb 21, 2020
1 parent 1a0beec commit 14726da
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 477 deletions.
4 changes: 0 additions & 4 deletions CHANGELOG.md
@@ -1,7 +1,3 @@
## 2.3.19 (2020-02-21)

- the client field was in the wrong place and didn't agree with Go

## 2.3.18 (2020-02-05)

- rename WoT attest -> vouch
Expand Down
44 changes: 18 additions & 26 deletions lib/base.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -27,7 +27,7 @@
"iced-error": ">=0.0.9",
"iced-lock": "^1.0.1",
"iced-runtime": ">=0.0.1",
"kbpgp": ">=2.1.12",
"kbpgp": ">=2.1.7",
"pgp-utils": ">=0.0.22",
"purepack": "^1.0.4",
"triplesec": ">=3.0.16"
Expand All @@ -36,4 +36,4 @@
"iced-coffee-script": "^108.0.11",
"iced-test": "0.0.22"
}
}
}
13 changes: 6 additions & 7 deletions src/base.iced
Expand Up @@ -542,7 +542,7 @@ class Base

ret.high_skip = @high_skip if @high_skip?

ret.client = @client if @client?
ret.body.client = @client if @client?
ret.body.merkle_root = @merkle_root if @merkle_root?
ret.body.revoke = @revoke if @has_revoke()

Expand Down Expand Up @@ -574,10 +574,9 @@ class Base

#------

generate_v2 : (cb, {dohash} = {}) ->
generate_v2 : (cb) ->
# If @seq_type isn't specified, then default to public
@seq_type or= constants.seq_types.PUBLIC
dohash or= false

esc = make_esc cb, "generate"
out = null
Expand All @@ -586,17 +585,17 @@ class Base
await @generate_json opts, esc defer s, o, expansions
inner = { str : s, obj : o }
await @generate_outer { inner }, esc defer outer
await @sig_eng.box outer, esc(defer({pgp, raw, armored})), { dohash }
await @sig_eng.box outer, esc defer {pgp, raw, armored}
{short_id, id} = make_ids raw
out = { pgp, id, short_id, raw, armored, inner, outer, expansions }
cb null, out

#------

generate_versioned : ({version, dohash}, cb) ->
generate_versioned : ({version}, cb) ->
switch version
when constants.versions.sig_v2 then @generate_v2(cb, {dohash})
else @generate(cb, {dohash})
when constants.versions.sig_v2 then @generate_v2 cb
else @generate cb

#------

Expand Down

0 comments on commit 14726da

Please sign in to comment.