aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-11-03Merge branch 'maint-0.2.9'Nick Mathewson
2016-11-03Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2016-11-03Merge remote-tracking branch 'arma/bug19969_028_squashed' into maint-0.2.8Nick Mathewson
2016-11-03Merge branch 'maint-0.2.9'Nick Mathewson
2016-11-03Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2016-11-03Add assertion that cpath_layer==NULL on OR circNick Mathewson
2016-11-03Merge remote-tracking branch 'dgoulet/bug20376_030_01'Nick Mathewson
2016-11-03fix wide linesNick Mathewson
2016-11-03Merge branch 'bug20527_030_01_squashed'Nick Mathewson
2016-11-03hs: Escape service directories before printing themIvan Markin
Signed-off-by: David Goulet <dgoulet@torproject.org>
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-03Merge branch 'bug20553_028'Nick Mathewson
2016-11-03Work around a behavior change in openssl's BUF_MEM codeNick Mathewson
In our code to write public keys to a string, for some unfathomable reason since 253f0f160e1185c, we would allocate a memory BIO, then set the NOCLOSE flag on it, extract its memory buffer, and free it. Then a little while later we'd free the memory buffer with BUF_MEM_free(). As of openssl 1.1 this doesn't work any more, since there is now a BIO_BUF_MEM structure that wraps the BUF_MEM structure. This BIO_BUF_MEM doesn't get freed in our code. So, we had a memory leak! Is this an openssl bug? Maybe. But our code was already pretty silly. Why mess around with the NOCLOSE flag here when we can just keep the BIO object around until we don't need the buffer any more? Fixes bug 20553; bugfix on 0.0.2pre8
2016-11-03Merge branch 'bug20551_028'Nick Mathewson
2016-11-03Use explicit casts to avoid warnings when building with openssl 1.1Nick Mathewson
fixes bug 20551; bugfix on 0.2.1.1-alpha
2016-11-03whitespace fixesNick Mathewson
2016-11-03Merge branch 'feature_15055_v2'Nick Mathewson
2016-11-03Audit use of tor_tls_cert_get_key().Nick Mathewson
This function is allowed to return NULL if the certified key isn't RSA. But in a couple of places we were treating this as a bug or internal error, and in one other place we weren't checking for it at all! Caught by Isis during code review for #15055. The serious bug was only on the 15055 branch, thank goodness.
2016-11-03Extract the common code in add_*_cert to a helper.Nick Mathewson
2016-11-03Mark some functions as needing documentation in src/or/routerkeys.c.Isis Lovecruft
2016-11-03Document two additional functions in src/or/routerkeys.c.Isis Lovecruft
Adds docstrings for generate_ed_link_cert() and should_make_new_ed_keys().
2016-11-03Generate our x509 certificates using sha256, not sha1.Nick Mathewson
All supported Tors (0.2.4+) require versions of openssl that can handle this. Now that our link certificates are RSA2048, this might actually help vs fingerprinting a little.
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-03Changes file for 15055 branch.Nick Mathewson
2016-11-03Clean up comments, mark more branches as BUG.Nick Mathewson
2016-11-03Test failing cases of ed25519 authentication.Nick Mathewson
2016-11-03Move unittests' RSA pregen code into a new file, and improve.Nick Mathewson
This patch moves the pregenerated RSA key logic into a new testing_rsakeys.c. Also, it adds support for RSA2048, since the link handshake tests want that. Also, it includes pregenerated keys, rather than trying to actually generate the keys at startup, since generating even a small handful of RSA2048 keys makes for an annoying delay.
2016-11-03Unit tests for cert-chain-processing, including failed casesNick Mathewson
Check out the coverage!
2016-11-03Label a few conditions in link authentication code as bugs.Nick Mathewson
2016-11-03Extend link handshake tests to handle successful Ed25519 handshakes.Nick Mathewson
Success cases only. Failure cases to come.
2016-11-03For testing: function to construct (but not save) Ed keys and certsNick Mathewson
2016-11-03For testing: add a tor_x509_cert_dup().Nick Mathewson
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-03Verify ed25519 link handshake certificatesNick Mathewson
This code stores the ed certs as appropriate, and tries to check them. The Ed25519 result is not yet used, and (because of its behavior) this will break RSA authenticate cells. That will get fixed as we go, however. This should implement 19157, but it needs tests, and it needs to get wired in.
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-03Handle u32 overflow in ed25519 cert expiration time.Nick Mathewson
The impact here isn't too bad. First, the only affected certs that expire after 32-bit signed time overflows in Y2038. Second, it could only make it seem that a non-expired cert is expired: it could never make it seem that an expired cert was still live. Fixes bug 20027; bugfix on 0.2.7.2-alpha.
2016-11-03Fix a misfeature with the Ed cert expiration APINick Mathewson
The batch-verification helper didn't expose the expiration time, which made it pretty error-prone. This closes ticket 15087.
2016-11-03Make the current time an argument to x509 cert-checking functionsNick Mathewson
This makes the code a bit cleaner by having more of the functions be pure functions that don't depend on the current time.
2016-11-03Add function to check RSA->Ed cross-certificationsNick Mathewson
Also, adjust signing approach to more closely match the signing scheme in the proposal. (The format doesn't quite match the format in the proposal, since RSA signatures aren't fixed-length.) Closes 19020.
2016-11-03Refactor RSA certificate checking into its own function.Nick Mathewson
2016-11-03Free rsa_ed_crosscert at exit.Nick Mathewson
Fixes bug 17779; bugfix on 0.2.7.2-alpha.
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-11-03Refactor ...compute_authenticate_cell_body() to return a var_cell_t.Nick Mathewson
This means we don't need to precompute the length. Helps simplify the implementation of 19156.
2016-11-03Code to send correct authentication data when we are using AUTHTYPE>2Nick Mathewson
Implements the major part of 19156, except doesn't actually send the new cell type yet.
2016-11-03New authentication types to use RFC5705.Nick Mathewson
See proposal 244. This feature lets us stop looking at the internals of SSL objects, *and* should let us port better to more SSL libraries, if they have RFC5705 support. Preparatory for #19156
2016-11-03Send ed25519 certificates in certs cell, when we have them.Nick Mathewson
Implements 19155 (send CERTS cells correctly for Ed25519) Also send RSA->Ed crosscert
2016-11-03Refactor connection_or_send_certs_cell() to use trunnelNick Mathewson
We no longer generate certs cells by pasting the certs together one by one. Instead we use trunnel to generate them. Preliminary work for 19155 (send CERTS cell with ed certs)
2016-11-03When parsing certs cells, allow more certs typesNick Mathewson
Implements the parsing part of #19157
2016-11-01Always call connection_ap_attach_pending() once a second.Nick Mathewson
Fixes bug 19969; bugfix on b1d56fc58. We can fix this some more in later Tors, but for now, this is probably the simplest fix possible. This is a belt-and-suspenders fix, where the earlier fix ("Ask event_base_loop to finish when we add a pending stream") aims to respond to new streams as soon as they arrive, and this one aims to make sure that we definitely respond to all of the streams.