diff options
author | Yawning Angel <yawning@schwanenlied.me> | 2016-06-14 06:24:13 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-06-14 12:13:09 -0400 |
commit | c5e2f7b9448cd0b7739e8515d0931b47fd208b9a (patch) | |
tree | a878b5cb156d7129b47c5fef275bafb4601ba8b6 | |
parent | 6ddef1f7e0fe36f6e0b87873dfef5809dd593539 (diff) | |
download | tor-c5e2f7b9448cd0b7739e8515d0931b47fd208b9a.tar.gz tor-c5e2f7b9448cd0b7739e8515d0931b47fd208b9a.zip |
Bug 19406: Fix the unit tests to work with OpenSSL 1.1.x
Just as it says on the tin. Don't need to fully disable any tests and
reduce coverage either. Yay me.
-rw-r--r-- | src/test/test_tortls.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/test_tortls.c b/src/test/test_tortls.c index 973e727b46..b9b74a1e96 100644 --- a/src/test/test_tortls.c +++ b/src/test/test_tortls.c @@ -385,10 +385,12 @@ test_tortls_log_one_error(void *ignored) LOG_WARN, 0, NULL); expect_log_severity(LOG_INFO); +#ifndef OPENSSL_1_1_API mock_clean_saved_logs(); tor_tls_log_one_error(tls, ERR_PACK(1, 2, SSL_R_RECORD_TOO_LARGE), LOG_WARN, 0, NULL); expect_log_severity(LOG_INFO); +#endif mock_clean_saved_logs(); tor_tls_log_one_error(tls, ERR_PACK(1, 2, SSL_R_UNKNOWN_PROTOCOL), @@ -683,7 +685,7 @@ test_tortls_get_my_client_auth_key(void *ignored) crypto_pk_t *ret; crypto_pk_t *expected; tor_tls_context_t *ctx; - RSA *k = tor_malloc_zero(sizeof(RSA)); + RSA *k = RSA_new(); ctx = tor_malloc_zero(sizeof(tor_tls_context_t)); expected = crypto_new_pk_from_rsa_(k); @@ -698,8 +700,8 @@ test_tortls_get_my_client_auth_key(void *ignored) tt_assert(ret == expected); done: + RSA_free(k); tor_free(expected); - tor_free(k); tor_free(ctx); } |