aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_link_handshake.c
AgeCommit message (Collapse)Author
2020-09-17Rename tor_cert_create to tor_cert_create_ed25519Nick Mathewson
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ tor_cert_create tor_cert_create_ed25519 It was generated with --no-verify, so it probably breaks some commit hooks. The commiter should be sure to fix them up in a subsequent commit.
2020-02-20Move relay_handshake.[ch] into src/feature/relay, and make it optionalNick Mathewson
2020-02-19Extract relay-only handshake code into its own file.Nick Mathewson
This is not the only relay-only handshake code, but it is most of such code that is in connection_or.c.
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-12-20Replace several C identifiers.teor
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ EXPOSE_CLEAN_BACKTRACE BACKTRACE_PRIVATE \ TOR_CHANNEL_INTERNAL_ CHANNEL_OBJECT_PRIVATE \ CHANNEL_PRIVATE_ CHANNEL_FILE_PRIVATE \ EXPOSE_ROUTERDESC_TOKEN_TABLE ROUTERDESC_TOKEN_TABLE_PRIVATE \ SCHEDULER_PRIVATE_ SCHEDULER_PRIVATE
2019-11-07Make all our struct names end with "_t".Nick Mathewson
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ address_ttl_s address_ttl_t \ aes_cnt_cipher aes_cnt_cipher_t \ authchallenge_data_s authchallenge_data_t \ authenticate_data_s authenticate_data_t \ cached_bw_event_s cached_bw_event_t \ cbuf cbuf_t \ cell_ewma_s cell_ewma_t \ certs_data_s certs_data_t \ channel_idmap_entry_s channel_idmap_entry_t \ channel_listener_s channel_listener_t \ channel_s channel_t \ channel_tls_s channel_tls_t \ circuit_build_times_s circuit_build_times_t \ circuit_muxinfo_s circuit_muxinfo_t \ circuitmux_policy_circ_data_s circuitmux_policy_circ_data_t \ circuitmux_policy_data_s circuitmux_policy_data_t \ circuitmux_policy_s circuitmux_policy_t \ circuitmux_s circuitmux_t \ coord coord_t \ cpuworker_job_u cpuworker_job_u_t \ cv_testinfo_s cv_testinfo_t \ ddmap_entry_s ddmap_entry_t \ dircollator_s dircollator_t \ dist_ops dist_ops_t \ ecdh_work_s ecdh_work_t \ ewma_policy_circ_data_s ewma_policy_circ_data_t \ ewma_policy_data_s ewma_policy_data_t \ fp_pair_map_entry_s fp_pair_map_entry_t \ fp_pair_map_s fp_pair_map_t \ guard_selection_s guard_selection_t \ mbw_cache_entry_s mbw_cache_entry_t \ outbuf_table_ent_s outbuf_table_ent_t \ queued_event_s queued_event_t \ replyqueue_s replyqueue_t \ rsa_work_s rsa_work_t \ sandbox_cfg_elem sandbox_cfg_elem_t \ scheduler_s scheduler_t \ smp_param smp_param_t \ socket_table_ent_s socket_table_ent_t \ state_s state_t \ threadpool_s threadpool_t \ timeout_cb timeout_cb_t \ tor_libevent_cfg tor_libevent_cfg_t \ tor_threadlocal_s tor_threadlocal_t \ url_table_ent_s url_table_ent_t \ worker_state_s worker_state_t \ workerthread_s workerthread_t \ workqueue_entry_s workqueue_entry_t
2019-10-22Re-run make autostyle.Nick Mathewson
2019-10-22test: Hide some test-declaration macro definitions to COCCI.Nick Mathewson
(These ones cause parsing failures.)
2019-06-05Run "make autostyle."Nick Mathewson
2019-04-30Replace all remaining tor_mem_is_zero() with fast_mem_is_zero()Nick Mathewson
2019-01-16Bump copyright date to 2019Nick Mathewson
2018-09-16When Tor is compiled with NSS, don't claim support for LinkAuth=1Nick Mathewson
Closes ticket 27288
2018-08-22NSS support for x509 certsNick Mathewson
7 unit tests are failing at this point, but they're all TLS-related.
2018-08-21Make some x509 functions generic; remove some fields NSS doesn't needNick Mathewson
2018-08-21Extract tortls structures into a new header; clean up a littleNick Mathewson
2018-08-21Split X509 code out of tortls.cNick Mathewson
2018-07-05Fix every include path changed in the previous commit (automated)Nick Mathewson
I am very glad to have written this script.
2018-07-01Remove needless includes from or.hNick Mathewson
or.h should really include only the minimum of stuff from or/*, common/*, and lib/*.
2018-06-29Eliminate compat.hNick Mathewson
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-06-15Extract cell type and their queues into new headersNick Mathewson
Since packed_cell and destroy_cell exist only to be queued, they go in the same headers as the queues.
2018-06-15Split or_handshake_{certs,state}_t into their own headers.Nick Mathewson
2018-06-15Move or_connection_t to its own header.Nick Mathewson
2017-12-08Rename connection_free_ to connection_free_minimal.Nick Mathewson
2017-08-24apply ahf's test_assert_null.cocciNick Mathewson
2017-08-24Fix operator usage in src/test/*.cAlexander Færøy
This patch fixes the operator usage in src/test/*.c to use the symbolic operators instead of the normal C comparison operators. This patch was generated using: ./scripts/coccinelle/test-operator-cleanup src/test/*.[ch]
2017-07-14Merge branch 'maint-0.3.0' into maint-0.3.1Nick Mathewson
2017-07-05Fix unit test memory leak in certs_ok_ed25519.Nick Mathewson
Fixes bug 22803; bugfix on 0.3.0.1-alpha.
2017-06-05Merge branch 'maint-0.3.0'Nick Mathewson
2017-06-05Merge branch 'maint-0.2.9' into maint-0.3.0Nick Mathewson
2017-06-05Rename "link" variable to avoid shadowing warning.Nick Mathewson
2017-06-05Merge branch 'maint-0.3.0'Nick Mathewson
2017-06-05Fix unit tests to work after own_link_cert assertionNick Mathewson
The assert_nonfatal() I had added was triggered by some of the code that tested the pre-ed case of CERTS cell generation.
2017-06-05Merge branch 'bug22460_030_01' into maint-0.3.0Nick Mathewson
2017-06-05Merge branch 'maint-0.2.9' into maint-0.3.0Nick Mathewson
2017-06-05Repair link_handshake unit tests to mock tor_tls_get_own_cert()Nick Mathewson
The tests previously assumed that the link handshake code would be calling get_my_certs() -- when I changed it to call get_own_cert() instead for the (case 2) 22460 fix, the tests failed, since the tls connection wasn't really there. This change makes us start mocking out the tor_tls_get_own_cert() function too. It also corrects the behavior of the mock_get_peer_cert() function -- it should have been returning a newly allocated copy.
2017-06-01Fix ed25519 link certificate race on tls context rotationNick Mathewson
Whenever we rotate our TLS context, we change our Ed25519 Signing->Link certificate. But if we've already started a TLS connection, then we've already sent the old X509 link certificate, so the new Ed25519 Signing->Link certificate won't match it. To fix this, we now store a copy of the Signing->Link certificate when we initialize the handshake state, and send that certificate as part of our CERTS cell. Fixes one case of bug22460; bugfix on 0.3.0.1-alpha.
2017-03-31Move "change cert expiration and re-sign" fn into tortls.cNick Mathewson
This lets test_link_handshake stop including openssl headers.
2017-03-31Mark many private tortls.h APIs as openssl-only.Nick Mathewson
This change lets us remove the openssl/ssl.h include from test_link_handshake.c.
2017-03-15Run the copyright update script.Nick Mathewson
2016-12-08Canonicity update for ed25519.Nick Mathewson
If a node can prove its Ed25519 identity, don't consider connections to it canonical unless they match both identities. Includes link handshake changes needed to avoid crashing with bug warnings, since the tests now reach more parts of the code. Closes ticket 20355
2016-12-08Rename connection_or_remove_from_identity_mapNick Mathewson
2016-11-03Fix two warnings in test_link_handshake.cNick Mathewson
One is fixed by disabling the -Wredundant-decls warnings around openssl headers here, because of the old double-declaration of SSL_get_selected_srtp_profile(). One is fixed by including compat.h before or.h so that we get the winsock2.h include before the windows.h include.
2016-11-03whitespace fixesNick Mathewson
2016-11-03Drop support for AUTHTYPE_RSA_SHA256_RFC5705 authentication.Nick Mathewson
This was a stopgap method, designed on the theory that some routers might support it before they could support Ed25519. But it looks like everybody who supports RFC5705 will also have an Ed25519 key, so there's not a lot of reason to have this even supported.
2016-11-03Test failing cases of ed25519 authentication.Nick Mathewson
2016-11-03Unit tests for cert-chain-processing, including failed casesNick Mathewson
Check out the coverage!
2016-11-03Extend link handshake tests to handle successful Ed25519 handshakes.Nick Mathewson
Success cases only. Failure cases to come.
2016-11-03Send and receive AUTHENTICATE cells correctly with ED keys.Nick Mathewson
Includes updated test for authchallenge cells