Nick Mathewson
60213a3621
Run "make autostyle."
2019-06-05 09:33:35 -04:00
Nick Mathewson
2f683465d4
Bump copyright date to 2019
2019-01-16 12:33:22 -05:00
Nick Mathewson
6925b61cfd
Fix various GCC LTO warnings in the unit tests.
2018-10-14 15:25:16 -04:00
Nick Mathewson
3b61bdb5ae
Try to fix new coverity warnings in unit tests.
2018-09-05 08:30:35 -04:00
Nick Mathewson
03efb67b42
Debug one last reference-counting issue that only appeared on openssl master
2018-09-04 20:46:46 -04:00
Nick Mathewson
274efb1263
Use FREE_AND_NULL for impl types
2018-09-04 14:52:35 -04:00
Nick Mathewson
ad94d43fc5
Port test_tortls_verify to not depend on openssl internals
2018-09-04 14:52:35 -04:00
Nick Mathewson
3cdf0497f9
Add unit test for bridge-style TLS initialization.
2018-09-04 14:52:35 -04:00
Nick Mathewson
52ac539b99
Test a few more tortls.c functions
2018-09-04 14:52:35 -04:00
Nick Mathewson
5205c7fd90
Initial NSS support for TLS.
...
This is enough to get a chutney network to bootstrap, though a bunch
of work remains.
2018-09-04 14:52:35 -04:00
Nick Mathewson
b9ca8f2356
Extract internal-only parts of x509.h
2018-08-21 12:25:33 -04:00
Nick Mathewson
1992c76130
Split tls modules and their tests into openssl and generic.
...
Also, add a stubbed-out nss version of the modules. The tests won't
pass with NSS yet since the NSS modules don't do anything.
This is a good patch to read with --color-moved.
2018-08-21 12:25:33 -04:00
Nick Mathewson
598bc78bfa
Extract tortls structures into a new header; clean up a little
2018-08-21 12:25:33 -04:00
Nick Mathewson
9a4f05b05c
Split X509 code out of tortls.c
2018-08-21 12:25:33 -04:00
Nick Mathewson
3ccb94d7b6
The RSA_free in this test is no longer needed or wanted
2018-08-21 12:24:08 -04:00
Nick Mathewson
824009cde5
Rename openssl-bridging functions in crypto_rsa
...
These functions exist only to expose RSA keys to other places in Tor
that use OpenSSL; let's be specific about their purpose.
2018-08-21 12:24:08 -04:00
Nick Mathewson
e7f5f48d68
Rename torlog.[ch] to log.[ch]
...
Fun fact: these files used to be called log.[ch] until we ran into
conflicts with systems having a log.h file. But now that we always
include "lib/log/log.h", we should be fine.
2018-07-10 15:20:30 -04:00
Nick Mathewson
ef486e3c02
Fix every include path changed in the previous commit (automated)
...
I am very glad to have written this script.
2018-07-05 17:15:50 -04:00
Nick Mathewson
986d761510
Extract or_state_t to its own header.
...
Fewer modules needed this than I had expected.
2018-07-01 15:20:37 -04:00
Nick Mathewson
6ac64e16ed
Eliminate compat.h
2018-06-29 12:21:52 -04:00
Nick Mathewson
da4ae8a6b6
Automated fixup of include paths after torlog.h movement.
2018-06-22 10:32:10 -04:00
Nick Mathewson
accf239fa3
Rectify include paths (automated)
2018-06-21 13:19:00 -04:00
Nick Mathewson
0dab29ce10
Run rectify_include_paths.py
2018-06-20 09:35:05 -04:00
Nick Mathewson
fb0019daf9
Update copyrights to 2018.
2018-06-20 08:13:28 -04:00
Marcin Cieślak
308eec7532
testing: X509 certificate structure needs to be initialized
...
We alloc/free X.509 structures in three ways:
1) X509 structure allocated with X509_new() and X509_free()
2) Fake X509 structure allocated with fake_x509_malloc() and fake_x509_free()
May contain valid pointers inside.
3) Empty X509 structure shell allocated with tor_malloc_zero() and
freed with tor_free()
2018-05-11 01:44:09 +00:00
Nick Mathewson
9df20f6076
Merge branch 'maint-0.3.3'
2018-05-09 08:25:52 -04:00
Nick Mathewson
89cafc4afa
Use OPENSSL_1_1_API in place of raw OPENSSL_VERSION_NUMBER checks
...
This is needed for libressl-2.6.4 compatibility, which we broke when
we merged a15b2c57e1
to fix bug 19981. Fixes bug 26005; bug
not in any released Tor.
2018-05-03 13:33:14 -04:00
Nick Mathewson
bf3e899dce
Merge branch 'libressl_201805_029' into maint-0.3.3
2018-05-02 08:26:49 -04:00
Nick Mathewson
75f3fbaa3c
LibreSSL compatibility fixes.
...
LibreSSL, despite not having the OpenSSL 1.1 API, does define
OPENSSL_VERSION in crypto.h. Additionally, it apparently annotates
some functions as returning NULL, so that our unit tests need to be
more careful about checking for NULL so they don't get compilation
warnings.
Closes ticket 26006.
2018-05-02 08:22:05 -04:00
Nick Mathewson
9d27e3f014
Make test_tortls.c build with openssl no_deprecated.
...
Also for 19981.
2018-04-18 12:32:39 -04:00
Nick Mathewson
f4af1919ab
Replace accumulated C ;;s with ;s
...
I don't know where these came from.
2017-09-15 16:43:17 -04:00
Nick Mathewson
76c33f7ff4
Merge branch 'scan-build-032'
2017-09-15 16:40:11 -04:00
Nick Mathewson
c1deabd3b0
Run our #else/#endif annotator on our source code.
2017-09-15 16:24:44 -04:00
Nick Mathewson
f2f729e26b
Clear up dead-assignment warnings from scan-build
2017-09-12 21:32:34 -04:00
Nick Mathewson
011d94fb11
apply ahf's test_assert_null.cocci
2017-08-24 15:55:27 -04:00
Nick Mathewson
5ca0d6daf0
Mark many private tortls.h APIs as openssl-only.
...
This change lets us remove the openssl/ssl.h include from
test_link_handshake.c.
2017-03-31 10:04:45 -04:00
Nick Mathewson
7505f452c8
Run the copyright update script.
2017-03-15 16:13:17 -04:00
Nick Mathewson
24551d64ad
Merge branch 'maint-0.2.9'
2017-02-01 10:39:59 -05:00
rubiate
e9ec818c28
Support LibreSSL with opaque structures
...
Determining if OpenSSL structures are opaque now uses an autoconf check
instead of comparing the version number. Some definitions have been
moved to their own check as assumptions which were true for OpenSSL
with opaque structures did not hold for LibreSSL. Closes ticket 21359.
2017-02-01 10:30:49 -05:00
Nick Mathewson
61612f980d
Merge branch 'maint-0.2.9'
2016-11-06 20:24:29 -05:00
Nick Mathewson
def41e93bd
In test_tortls_classify_client_ciphers(), s/ECDH/ECDHE/
...
(We weren't actually using these ciphers; we were just requing that
ciphers of that name existed.)
Patch from rubiate. Fixes 20460
2016-11-06 20:23:40 -05:00
Nick Mathewson
0b4221f98d
Make the current time an argument to x509 cert-checking functions
...
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-03 08:37:22 -04:00
Nick Mathewson
5e30e26c6d
Chop another ~93 RSA key generations out of the unit tests
...
We have a mock for our RSA key generation function, so we now wire
it to pk_generate(). This covers all the cases that were not using
pk_generate() before -- all ~93 of them.
2016-09-09 09:45:50 -04:00
Nick Mathewson
63e34e9e49
Reinstate a couple of teardown_capture_of_logs that I missed
...
Patch from rubiate. See #19999
2016-09-08 19:49:21 -04:00
Nick Mathewson
deb294ff53
Simplify log_test_helpers interface
...
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-08 15:03:11 -04:00
Nick Mathewson
b0a9e54705
Resolve more BUG warnings in the unit tests
2016-09-08 14:39:20 -04:00
Nick Mathewson
69dce09031
Do not call tor_tls_server_info_callback(NULL) from tests.
...
This isn't valid behavior, and it causes a crash when you run
the unit tests at --debug.
I've added an IF_BUG_ONCE() check for this case.
2016-08-31 13:18:13 -04:00
Nick Mathewson
05e2750ea7
whoops; blank line
2016-06-14 20:21:59 -04:00
Nick Mathewson
3bffdf05d1
use new-form macros to disable -Wredundant-decls
2016-06-14 12:22:52 -04:00
Nick Mathewson
df4fa92a88
Merge branch 'maint-0.2.8'
2016-06-14 12:17:24 -04:00