aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_link_handshake.c
AgeCommit message (Collapse)Author
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
2016-11-03Increase TLS RSA link key length to 2048 bitsNick Mathewson
Oddly, nothing broke. Closes ticket 13752.
2016-11-03Add "Ed ID" arguments to a bunch of connection-ID-related fns.Nick Mathewson
In particular, these functions are the ones that set the identity of a given connection or channel, and/or confirm that we have learned said IDs. There's a lot of stub code here: we don't actually need to use the new keys till we start looking up connections/channels by Ed25519 IDs. Still, we want to start passing the Ed25519 IDs in now, so it makes sense to add these stubs as part of 15055.
2016-11-03Refactor RSA certificate checking into its own function.Nick Mathewson
2016-11-03Migrate certificates into a sub-structure of or_handshake_stateNick Mathewson
This will help us do cert-checking in the background in the future, perhaps.
2016-09-08Simplify log_test_helpers interfaceNick Mathewson
Previously, you needed to store the previous log severity in a local variable, and it wasn't clear if you were allowed to call these functions more than once.
2016-09-08more consistent use of expect_log_msg_containingNick Mathewson
2016-08-31Require specific messages for remaining link-handshake failure casesNick Mathewson
2016-08-31Improvements to test_link_handshake: check specific error messagesNick Mathewson
Otherwise it's too easy to lose our test coverage.
2016-08-31Fix all "BUG" warnings created from link-handshake tests.Nick Mathewson
2016-06-11Add -Wmissing-variable-declarations, with attendant fixesNick Mathewson
This is a big-ish patch, but it's very straightforward. Under this clang warning, we're not actually allowed to have a global variable without a previous extern declaration for it. The cases where we violated this rule fall into three roughly equal groups: * Stuff that should have been static. * Stuff that was global but where the extern was local to some other C file. * Stuff that was only global when built for the unit tests, that needed a conditional extern in the headers. The first two were IMO genuine problems; the last is a wart of how we build tests.
2016-02-27Update the copyright year.Nick Mathewson
2015-06-01More check-spaces fixesNick Mathewson