diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-09-23 10:44:38 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-09-23 11:02:21 -0400 |
commit | c5e87e33c7a3bf0f3d6b289814d303bcb4c63fe2 (patch) | |
tree | 697388196be5e2808ccfec0ec6096d99cf049009 /src/test | |
parent | 81724d5a001575e3f25da665b8bdedf287ace765 (diff) | |
download | tor-c5e87e33c7a3bf0f3d6b289814d303bcb4c63fe2.tar.gz tor-c5e87e33c7a3bf0f3d6b289814d303bcb4c63fe2.zip |
Allow conflicts to occur in keypinning journal
When we find a conflict in the keypinning journal, treat the new
entry as superseding all old entries that overlap either of its
keys.
Also add a (not-yet-used) configuration option to disable keypinning
enforcement.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_keypin.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/test_keypin.c b/src/test/test_keypin.c index afd4ca201d..033578cae8 100644 --- a/src/test/test_keypin.c +++ b/src/test/test_keypin.c @@ -108,21 +108,21 @@ test_keypin_parse_file(void *arg) ; tt_int_op(0, ==, keypin_load_journal_impl(data2, strlen(data2))); - tt_int_op(11, ==, smartlist_len(mock_addent_got)); + tt_int_op(13, ==, smartlist_len(mock_addent_got)); ent = smartlist_get(mock_addent_got, 9); tt_mem_op(ent->rsa_id, ==, "\"You have made a goo", 20); tt_mem_op(ent->ed25519_key, ==, "d beginning.\" But no more. Wizar", 32); - ent = smartlist_get(mock_addent_got, 10); + ent = smartlist_get(mock_addent_got, 12); tt_mem_op(ent->rsa_id, ==, "ds speak truth, and ", 20); - tt_mem_op(ent->ed25519_key, ==, "it was true that all the master\n", 32); + tt_mem_op(ent->ed25519_key, ==, "it was tru\xa5 that all the master\n", 32); /* File truncated before NL */ const char data3[] = "Tm8gZHJhZ29uIGNhbiByZXNpc3Q IHRoZSBmYXNjaW5hdGlvbiBvZiByaWRkbGluZyB0YWw"; tt_int_op(0, ==, keypin_load_journal_impl(data3, strlen(data3))); - tt_int_op(12, ==, smartlist_len(mock_addent_got)); - ent = smartlist_get(mock_addent_got, 11); + tt_int_op(14, ==, smartlist_len(mock_addent_got)); + ent = smartlist_get(mock_addent_got, 13); tt_mem_op(ent->rsa_id, ==, "No dragon can resist", 20); tt_mem_op(ent->ed25519_key, ==, " the fascination of riddling tal", 32); |