summaryrefslogtreecommitdiff
path: root/src/or/torcert.c
AgeCommit message (Collapse)Author
2018-04-06crypto: Refactor (P)RNG functionality into new crypto_rand module.Isis Lovecruft
* ADD new /src/common/crypto_rand.[ch] module. * ADD new /src/common/crypto_util.[ch] module (contains the memwipe() function, since all crypto_* modules need this). * FIXES part of #24658: https://bugs.torproject.org/24658
2018-01-31Merge branch 'maint-0.3.2'Nick Mathewson
2018-01-26When a tor_cert_T check fails, log the reason why.Nick Mathewson
Diagnostic attempt for 24972.
2017-12-08Change the free macro convention in the rest of src/or/*.hNick Mathewson
2017-10-03torcert.c: mark some lines unreachable by testsNick Mathewson
These are related to handling of failures on functions which can't fail.
2017-08-28Merge remote-tracking branch 'haxxpop/fuzzing-hsv3'Nick Mathewson
2017-08-13Mock rsa_ed25519_crosscert_checkSuphanat Chunhapanya
This commit just mocks the rsa_ed25519_crosscert_check to be used later in the fuzzer.
2017-07-28Bug 23055: cast, then multiply when doing u32*u32->u64.Nick Mathewson
No backport, since this bug won't trigger until people make certificates expiring after the Y2106 deadline. CID 1415728
2017-06-05Merge branch 'bug22466_diagnostic_030'Nick Mathewson
2017-06-01Use tor_assert_nonfatal() to try to detect #22466Nick Mathewson
2017-03-15Run the copyright update script.Nick Mathewson
2016-12-01Merge remote-tracking branch 'dgoulet/ticket20568_030_01'Nick Mathewson
2016-11-10Move encode_cert to torcert.c and rename it to tor_cert_encode_ed22519()Neel Chauhan
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-03Only check cert expiry vs TIME_MAX when time_t is less than 64-bitNick Mathewson
Fixes issue 20558 / CID 1375988.
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-03Clean up comments, mark more branches as BUG.Nick Mathewson
2016-11-03Unit tests for cert-chain-processing, including failed casesNick Mathewson
Check out the coverage!
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-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-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-10-26More module-level documentation.Nick Mathewson
2016-03-26Fix all doxygen warnings (other than missing docs)Nick Mathewson
2016-02-27Update the copyright year.Nick Mathewson
2016-02-27Make sure that every module in src/or has a brief description.Nick Mathewson
2015-11-30Fix undefined behavior caused by memory overlapcypherpunks
The tor_cert_get_checkable_sig function uses the signing key included in the certificate (if available) when a separate public key is not given. When the signature is valid, the tor_cert_checksig function copies the public key from the checkable structure to the public key field of the certificate signing key. In situations where the separate public key is not given but the certificate includes a signing key, the source and destination pointers in the copy operation are equal and invoke undefined behavior. Undefined behaviour is avoided by ensuring both pointers are different.
2015-07-14Add more consistency checks in load_ed_keysNick Mathewson
Make sure that signing certs are signed by the right identity key, to prevent a recurrence of #16530. Also make sure that the master identity key we find on disk matches the one we have in RAM, if we have one. This is for #16581.
2015-06-01Appease make check-spacesAndrea Shepard
2015-05-28Fix a bug in earlier torcert fix, fix another.Nick Mathewson
2015-05-28Memory leak in tor_cert_parse. CID gi1301381Nick Mathewson
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-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-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)