summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-05-28Merge branch '12498_ed25519_keys_v6'Nick Mathewson
Fixed numerous conflicts, and ported code to use new base64 api.
2015-05-28Document some ed25519 key optionsNick Mathewson
2015-05-28Note some functions that should move or be mergedNick Mathewson
2015-05-28Do not allocate our ed-link crosscert till after tls ctxNick Mathewson
We need this to prevent some annoying chutney crash-at-starts
2015-05-28Generate weird certificates correctlyNick Mathewson
(Our link protocol assumes that the link cert certifies the TLS key, and there is an RSA->Ed25519 crosscert)
2015-05-28Regenerate ed25519 keys when they will expire soon.Nick Mathewson
Also, have testing-level options to set the lifetimes and expiration-tolerances of all key types, plus a non-testing-level option to set the lifetime of any auto-generated signing key.
2015-05-28# This is a combination of 2 commits.Nick Mathewson
# The first commit's message is: Regenerate ed25519 keys when they will expire soon. Also, have testing-level options to set the lifetimes and expiration-tolerances of all key types, plus a non-testing-level option to set the lifetime of any auto-generated signing key. # The 2nd commit message will be skipped: # fixup! Regenerate ed25519 keys when they will expire soon.
2015-05-28Only load master ed25519 secret keys when we absolutely must.Nick Mathewson
2015-05-28Implement ed25519 identity collation for voting.Nick Mathewson
This is a new collator type that follows proposal 220 for deciding which identities to include. The rule is (approximately): If a <ed,rsa> identity is listed by more than half of authorities, include it. And include all <rsa> votes about that node as matching. Otherwise, if an <*,rsa> or <rsa> identity is listed by more than half of the authorities, and no <ed,rsa> has been listed, include it.
2015-05-28Refactor code that matches up routers with the same identity in votesNick Mathewson
This makes 'routerstatus collation' into a first-class concept, so we can change how that works for prop220.
2015-05-28Checkpoint some work on voting on ed25519 identitiesNick Mathewson
* Include ed25519 identities in votes * Include "no ed25519 identity" in votes * Include some commented-out code about identity voting. (This will disappear.) * Include some functions for identity voting (These will disappear.) * Enforce uniqueness in ed25519 keys within a vote
2015-05-28Enforce more correspondence between ri and eiNick Mathewson
In particular, they have to list the same ed25519 certificate, and the SHA256 digest of the ei needs to match.
2015-05-28Sign extrainfo documents with ed25519Nick Mathewson
Extrainfo documents are now ed-signed just as are router descriptors, according to proposal 220. This patch also includes some more tests for successful/failing parsing, and fixes a crash bug in ed25519 descriptor parsing.
2015-05-28Revise makedesc.py: teach it how to emit ed signatures and crosscertsNick Mathewson
Also, add a trivial ed25519-signed routerinfo to the tests.
2015-05-28Refactor link handshake cell type implementations to use trunnelNick Mathewson
Unit tests still pass.
2015-05-28Fix memory leaks in test_link_handshake.cNick Mathewson
2015-05-28Tests for AUTHENTICATE cell functionality.Nick Mathewson
2015-05-28Start testing cell encoders/processers for the v3 handshake.Nick Mathewson
An earlier version of these tests was broken; now they're a nicer, more robust, more black-box set of tests. The key is to have each test check a handshake message that is wrong in _one_ way.
2015-05-28Add trunnel-generated items for link handshake code.Nick Mathewson
This includes the link handshake variations for proposal220. We'll use this for testing first, and then use it to extend our current code to support prop220.
2015-05-28Include ed25519 keys in microdescriptors.Nick Mathewson
2015-05-28Fix the position-check for ed25519 certs to work with annotationsNick Mathewson
When there are annotations on a router descriptor, the ed25519-identity element won't be at position 0 or 1; it will be at router+1 or router-1. This patch also adds a missing smartlist function to search a list for an item with a particular pointer.
2015-05-28Tie key-pinning logic into directory authority operationNick Mathewson
With this patch: * Authorities load the key-pinning log at startup. * Authorities open a key-pinning log for writing at startup. * Authorities reject any router with an ed25519 key where they have previously seen that ed25519 key with a different RSA key, or vice versa. * Authorities warn about, but *do not* reject, RSA-only descriptors when the RSA key has previously gone along with an Ed25519 key. (We should make this a 'reject' too, but we can't do that until we're sure there's no legit reason to downgrade to 0.2.5.)
2015-05-28Key-pinning back-end for directory authorities.Nick Mathewson
This module implements a key-pinning mechanism to ensure that it's safe to use RSA keys as identitifers even as we migrate to Ed25519 keys. It remembers, for every Ed25519 key we've seen, what the associated Ed25519 key is. This way, if we see a different Ed25519 key with that RSA key, we'll know that there's a mismatch. We persist these entries to disk using a simple format, where each line has a base64-encoded RSA SHA1 hash, then a base64-endoded Ed25519 key. Empty lines, misformed lines, and lines beginning with a # are ignored. Lines beginning with @ are reserved for future extensions.
2015-05-28Implement proposal 228: cross-certification with onion keysNick Mathewson
Routers now use TAP and ntor onion keys to sign their identity keys, and put these signatures in their descriptors. That allows other parties to be confident that the onion keys are indeed controlled by the router that generated the descriptor.
2015-05-28Implement proposal 228: cross-certification with onion keysNick Mathewson
Routers now use TAP and ntor onion keys to sign their identity keys, and put these signatures in their descriptors. That allows other parties to be confident that the onion keys are indeed controlled by the router that generated the descriptor.
2015-05-28Implement ed25519-signed descriptorsNick Mathewson
Now that we have ed25519 keys, we can sign descriptors with them and check those signatures as documented in proposal 220.
2015-05-28prop220: Implement certificates and key storage/creationNick Mathewson
For prop220, we have a new ed25519 certificate type. This patch implements the code to create, parse, and validate those, along with code for routers to maintain their own sets of certificates and keys. (Some parts of master identity key encryption are done, but the implementation of that isn't finished)
2015-05-26FIx a couple of mistypes.rl1987
2015-05-26Merge remote-tracking branch 'origin/maint-0.2.6'Nick Mathewson
2015-05-26Fix --enable-systemd builds on systems with libsystemd but not systemdNick Mathewson
Fixes bug 16164; bugfix on 0.2.6.3-alpha. Patch from Peter Palfrader.
2015-05-22Revert "Try using SSL_get_ciphers in place of session->ciphers"Nick Mathewson
This reverts commit 67964cfa787461bc56380fe46439fd5c9863bb4f. It was the cause of #16153, and was not in any released Tor. We need a better solution for getting session->ciphers.
2015-05-21Merge remote-tracking branch 'yawning/ticket16140'Nick Mathewson
2015-05-21Revert the broken part of 548b4beNick Mathewson
Fixes 16152.
2015-05-21Remove support for OpenSSL without ECC.Yawning Angel
As OpenSSL >= 1.0.0 is now required, ECDHE is now mandatory. The group has to be validated at runtime, because of RedHat lawyers (P224 support is entirely missing in the OpenSSL RPM, but P256 is present and is the default). Resolves ticket #16140.
2015-05-21Generate error ASAP if building with too-old opensslNick Mathewson
2015-05-21move "version" declaration to avoid "set but not used" warningsNick Mathewson
2015-05-21Merge remote-tracking branch 'yawning/bug16052a_027'Nick Mathewson
2015-05-21fwd-port 0.2.6.8 changelogNick Mathewson
2015-05-2019:38 < Yawning> nickm: you left the "+#ifndef SSL_clear_mode" block in ;_;Nick Mathewson
2015-05-20Merge branch 'bug16034_no_more_openssl_098_squashed'Nick Mathewson
Conflicts: src/test/testing_common.c
2015-05-20Drop support for OpenSSLs without AES_CTRNick Mathewson
2015-05-20Now that OpenSSL 0.9.8 is dead, crypto_seed_rng() needs no argsNick Mathewson
It needed an argument before because it wasn't safe to call RAND_poll() on openssl 0.9.8c if you had already opened more fds than would fit in fd_set.
2015-05-20Remove code to support OpenSSL 0.9.8Nick Mathewson
2015-05-20Stop poking SSL_CTX->comp_methodsNick Mathewson
2015-05-20Use SSL_CIPHER accessor functionsNick Mathewson
2015-05-20Use SSL_CIPHER_find where possible.Nick Mathewson
2015-05-20Try using SSL_get_ciphers in place of session->ciphersNick Mathewson
This should help openssl 1.1. On pre-1.1, we double-check that these two methods give us the same list, since the underlying code is awfully hairy.
2015-05-20Tweak rectify_client_ciphers to work with openssl 1.1Nick Mathewson
The key here is to never touch ssl->cipher_list directly, but only via SSL_get_ciphers(). But it's not so simple. See, if there is no specialized cipher_list on the SSL object, SSL_get_ciphers returns the cipher_list on the SSL_CTX. But we sure don't want to modify that one! So we need to use SSL_set_cipher_list first to make sure that we really have a cipher list on the SSL object.
2015-05-20Add support for 'HiddenServiceMaxStream' to 'ADD_ONION'.Yawning Angel
Done as a separate commit to ease backporting the tunables to 0.2.6.x.
2015-05-20Add "HiddenServiceMaxStreams" as a per-HS tunable.Yawning Angel
When set, this limits the maximum number of simultaneous streams per rendezvous circuit on the server side of a HS, with further RELAY_BEGIN cells being silently ignored. This can be modified via "HiddenServiceMaxStreamsCloseCircuit", which if set will cause offending rendezvous circuits to be torn down instead. Addresses part of #16052.