keybase-proofs 2.3.34 → 2.3.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/lib/base.js +64 -62
- package/lib/subkey.js +16 -14
- package/package.json +7 -2
- package/src/base.iced +6 -3
- package/src/subkey.iced +6 -4
- package/.github/workflows/ci.yml +0 -37
- package/.z-scratch/codex-session-01a08545-90c5-73c0-b2c2-68d94481fb63.md +0 -9075
- package/CONTRIBUTORS.md +0 -5
- package/Makefile +0 -69
- package/teams_sample.cson +0 -211
- package/test/files/alloc.iced +0 -40
- package/test/files/auth.iced +0 -132
- package/test/files/b64.iced +0 -58
- package/test/files/errsan.iced +0 -13
- package/test/files/expand.iced +0 -128
- package/test/files/generic_social.iced +0 -67
- package/test/files/parse3.iced +0 -61
- package/test/files/per_user_key.iced +0 -74
- package/test/files/schema3.iced +0 -258
- package/test/files/sibkey.iced +0 -60
- package/test/files/team.iced +0 -118
- package/test/files/team_hidden.iced +0 -321
- package/test/files/util.iced +0 -55
- package/test/files/v2.iced +0 -410
- package/test/files/wallet.iced +0 -110
- package/test/run.iced +0 -1
- package/test_scraper.iced +0 -49
package/src/base.iced
CHANGED
|
@@ -76,7 +76,7 @@ compare_hash_buf_to_str = (b, s) ->
|
|
|
76
76
|
|
|
77
77
|
class Verifier
|
|
78
78
|
|
|
79
|
-
constructor : ({@armored, @id, @short_id, @skip_ids, @make_ids, @strict, @now, @critical_clock_skew_secs, @skip_clock_skew_check, @inner, @outer, @expansions, @assert_pgp_hash, @require_packet_hash}, @sig_eng, @base) ->
|
|
79
|
+
constructor : ({@armored, @id, @short_id, @skip_ids, @make_ids, @strict, @now, @critical_clock_skew_secs, @skip_clock_skew_check, @inner, @outer, @expansions, @assert_pgp_hash, @require_packet_hash, @pgp_max_length}, @sig_eng, @base) ->
|
|
80
80
|
|
|
81
81
|
#---------------
|
|
82
82
|
|
|
@@ -215,7 +215,9 @@ class Verifier
|
|
|
215
215
|
|
|
216
216
|
_parse_and_process : ({armored}, cb) ->
|
|
217
217
|
err = null
|
|
218
|
-
|
|
218
|
+
# pgp_max_length only applies to PGP messages since Keybase NaCl
|
|
219
|
+
# does not have a compression feature.
|
|
220
|
+
await @sig_eng.unbox armored, defer(err, payload, body), { @assert_pgp_hash, @require_packet_hash, @pgp_max_length }
|
|
219
221
|
if not err? and not @skip_ids
|
|
220
222
|
await @_check_ids body, defer err
|
|
221
223
|
if not err? and @make_ids
|
|
@@ -244,7 +246,7 @@ class Verifier
|
|
|
244
246
|
err = new Error "non-canonical JSON found in strict mode (#{errsan ours} v #{errsan json_str_utf8_trimmed})"
|
|
245
247
|
return cb err
|
|
246
248
|
await akatch (() -> expand_json({ json : json_tmp, expansions})), esc defer @json
|
|
247
|
-
await @base._v_check {@json, @assert_pgp_hash}, esc defer()
|
|
249
|
+
await @base._v_check {@json, @assert_pgp_hash, @pgp_max_length}, esc defer()
|
|
248
250
|
cb null, @json, json_str_utf8
|
|
249
251
|
|
|
250
252
|
#==========================================================================
|
|
@@ -659,6 +661,7 @@ class Base
|
|
|
659
661
|
# @option obj {bool} strict Turn on all strict-mode checks
|
|
660
662
|
# @option obj {bool} require_packet_hash Turn on if we require a packet hash
|
|
661
663
|
# @option obj {Function} assert_pgp_hash Callback to reject specific PGP hash functions if encountered
|
|
664
|
+
# @option obj {number} pgp_max_length Max length of PGP message (after decompression)
|
|
662
665
|
verify : (obj, cb) ->
|
|
663
666
|
verifier = new Verifier obj, @sig_eng, @
|
|
664
667
|
await verifier.verify defer err, json_obj, json_str
|
package/src/subkey.iced
CHANGED
|
@@ -59,10 +59,10 @@ exports.SubkeyBase = class SubkeyBase extends Base
|
|
|
59
59
|
err = new Error "Reverse sig json mismatch: #{a} != #{b}"
|
|
60
60
|
return err
|
|
61
61
|
|
|
62
|
-
_v_check : ({json, assert_pgp_hash}, cb) ->
|
|
62
|
+
_v_check : ({json, assert_pgp_hash, pgp_max_length}, cb) ->
|
|
63
63
|
esc = make_esc cb, "SubkeyBase::_v_check"
|
|
64
64
|
await super { json }, esc defer()
|
|
65
|
-
await @reverse_sig_check { json, new_km: @get_new_km(), assert_pgp_hash }, esc defer()
|
|
65
|
+
await @reverse_sig_check { json, new_km: @get_new_km(), assert_pgp_hash, pgp_max_length }, esc defer()
|
|
66
66
|
cb null
|
|
67
67
|
|
|
68
68
|
_get_reverse_sig : (json) ->
|
|
@@ -73,7 +73,7 @@ exports.SubkeyBase = class SubkeyBase extends Base
|
|
|
73
73
|
# body.sibkey.reverse_sig should be the only field different between the two
|
|
74
74
|
outer.body[@get_key_field()].reverse_sig = null
|
|
75
75
|
|
|
76
|
-
reverse_sig_check : ({json, new_km, subkm, assert_pgp_hash}, cb) ->
|
|
76
|
+
reverse_sig_check : ({json, new_km, subkm, assert_pgp_hash, pgp_max_length}, cb) ->
|
|
77
77
|
|
|
78
78
|
# For historical reasons, some people call 'new_km' 'subkm'
|
|
79
79
|
new_km or= subkm
|
|
@@ -82,7 +82,9 @@ exports.SubkeyBase = class SubkeyBase extends Base
|
|
|
82
82
|
err = null
|
|
83
83
|
if (sig = @_get_reverse_sig(json))? and new_km?
|
|
84
84
|
eng = new_km.make_sig_eng()
|
|
85
|
-
|
|
85
|
+
# pgp_max_length only applies to PGP messages since Keybase NaCl
|
|
86
|
+
# does not have a compression feature.
|
|
87
|
+
await eng.unbox sig, esc(defer(raw)), { assert_pgp_hash, pgp_max_length }
|
|
86
88
|
await a_json_parse raw, esc defer payload
|
|
87
89
|
rsk = new_km.get_ekid().toString('hex')
|
|
88
90
|
if (err = @_match_json json, payload)? then # noop
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [master]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [master]
|
|
8
|
-
|
|
9
|
-
permissions:
|
|
10
|
-
contents: read # access to check out code and install dependencies
|
|
11
|
-
|
|
12
|
-
jobs:
|
|
13
|
-
test:
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
|
|
16
|
-
strategy:
|
|
17
|
-
matrix:
|
|
18
|
-
node-version: [22, 24, 26]
|
|
19
|
-
|
|
20
|
-
steps:
|
|
21
|
-
- name: Checkout code
|
|
22
|
-
uses: actions/checkout@v7
|
|
23
|
-
|
|
24
|
-
- name: Setup Node.js ${{ matrix.node-version }}
|
|
25
|
-
uses: actions/setup-node@v7
|
|
26
|
-
with:
|
|
27
|
-
node-version: ${{ matrix.node-version }}
|
|
28
|
-
cache: "npm"
|
|
29
|
-
|
|
30
|
-
- name: Install dependencies
|
|
31
|
-
run: npm ci
|
|
32
|
-
|
|
33
|
-
- name: Build project
|
|
34
|
-
run: make build
|
|
35
|
-
|
|
36
|
-
- name: Run tests
|
|
37
|
-
run: make test-server
|