diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-02-03 11:13:12 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-02-03 11:13:12 -0500 |
commit | 27582325dc691f02c41612a258483a73f2e0e000 (patch) | |
tree | 61314753c73f7ee49a2f94cff54a86f2ad6d7733 /src/test/test_tortls.c | |
parent | 957cdb54699937818b539c75e413e88760ee34cd (diff) | |
download | tor-27582325dc691f02c41612a258483a73f2e0e000.tar.gz tor-27582325dc691f02c41612a258483a73f2e0e000.zip |
Make Tor build happily with OpenSSL master and libressl.
Also tested with 1.0.0t and 1.0.2f.
Closes ticket 19784.
Closes most of 17921. (Still need to make some tests pass.)
Diffstat (limited to 'src/test/test_tortls.c')
-rw-r--r-- | src/test/test_tortls.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/test/test_tortls.c b/src/test/test_tortls.c index 98f5facc11..ce7e6bcde4 100644 --- a/src/test/test_tortls.c +++ b/src/test/test_tortls.c @@ -1347,11 +1347,10 @@ test_tortls_get_buffer_sizes(void *ignored) tls->ssl->s3->wbuf.offset = 0; tls->ssl->s3->wbuf.left = 43; + ret = tor_tls_get_buffer_sizes(tls, &rbuf_c, &rbuf_b, &wbuf_c, &wbuf_b); #if OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,1,0) - ret = tor_tls_get_buffer_sizes(NULL, NULL, NULL, NULL, NULL); tt_int_op(ret, OP_EQ, -1); #else - ret = tor_tls_get_buffer_sizes(tls, &rbuf_c, &rbuf_b, &wbuf_c, &wbuf_b); tt_int_op(ret, OP_EQ, 0); tt_int_op(rbuf_c, OP_EQ, 0); tt_int_op(wbuf_c, OP_EQ, 0); @@ -2594,14 +2593,14 @@ test_tortls_create_certificate(void *ignored) tt_assert(!ret); fixed_crypto_pk_get_evp_pkey_result_index = 0; - fixed_crypto_pk_get_evp_pkey_result[0] = tor_malloc_zero(sizeof(EVP_PKEY)); + fixed_crypto_pk_get_evp_pkey_result[0] = EVP_PKEY_new(); fixed_crypto_pk_get_evp_pkey_result[1] = NULL; ret = tor_tls_create_certificate(pk1, pk2, "hello", "hello2", 1); tt_assert(!ret); fixed_crypto_pk_get_evp_pkey_result_index = 0; - fixed_crypto_pk_get_evp_pkey_result[0] = tor_malloc_zero(sizeof(EVP_PKEY)); - fixed_crypto_pk_get_evp_pkey_result[1] = tor_malloc_zero(sizeof(EVP_PKEY)); + fixed_crypto_pk_get_evp_pkey_result[0] = EVP_PKEY_new(); + fixed_crypto_pk_get_evp_pkey_result[1] = EVP_PKEY_new(); ret = tor_tls_create_certificate(pk1, pk2, "hello", "hello2", 1); tt_assert(!ret); |