mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
Fix ISO C function/object pointer issue
Showed up on GCC with strict warnings. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3325)
This commit is contained in:
parent
710756a9b3
commit
cf10df81e1
@ -264,16 +264,16 @@ static int test_keylog(void)
|
||||
if (!TEST_true(SSL_CTX_set_cipher_list(cctx, "RSA")))
|
||||
goto end;
|
||||
|
||||
if (!TEST_ptr_null((void *)SSL_CTX_get_keylog_callback(cctx))
|
||||
|| !TEST_ptr_null((void *)SSL_CTX_get_keylog_callback(sctx)))
|
||||
if (!TEST_true(SSL_CTX_get_keylog_callback(cctx) == NULL)
|
||||
|| !TEST_true(SSL_CTX_get_keylog_callback(sctx) == NULL))
|
||||
goto end;
|
||||
SSL_CTX_set_keylog_callback(cctx, client_keylog_callback);
|
||||
if (!TEST_ptr_eq((void *)SSL_CTX_get_keylog_callback(cctx),
|
||||
(void *)client_keylog_callback))
|
||||
if (!TEST_true(SSL_CTX_get_keylog_callback(cctx)
|
||||
== client_keylog_callback))
|
||||
goto end;
|
||||
SSL_CTX_set_keylog_callback(sctx, server_keylog_callback);
|
||||
if (!TEST_ptr_eq((void *)SSL_CTX_get_keylog_callback(sctx),
|
||||
(void *)server_keylog_callback))
|
||||
if (!TEST_true(SSL_CTX_get_keylog_callback(sctx)
|
||||
== server_keylog_callback))
|
||||
goto end;
|
||||
|
||||
/* Now do a handshake and check that the logs have been written to. */
|
||||
@ -334,18 +334,18 @@ static int test_keylog_no_master_key(void)
|
||||
&cctx, cert, privkey)))
|
||||
return 0;
|
||||
|
||||
if (!TEST_ptr_null((void *)SSL_CTX_get_keylog_callback(cctx))
|
||||
|| !TEST_ptr_null((void *)SSL_CTX_get_keylog_callback(sctx)))
|
||||
if (!TEST_true(SSL_CTX_get_keylog_callback(cctx) == NULL)
|
||||
|| !TEST_true(SSL_CTX_get_keylog_callback(sctx) == NULL))
|
||||
goto end;
|
||||
|
||||
SSL_CTX_set_keylog_callback(cctx, client_keylog_callback);
|
||||
if (!TEST_ptr_eq((void *)SSL_CTX_get_keylog_callback(cctx),
|
||||
(void *)client_keylog_callback))
|
||||
if (!TEST_true(SSL_CTX_get_keylog_callback(cctx)
|
||||
== client_keylog_callback))
|
||||
goto end;
|
||||
|
||||
SSL_CTX_set_keylog_callback(sctx, server_keylog_callback);
|
||||
if (!TEST_ptr_eq((void *)SSL_CTX_get_keylog_callback(sctx),
|
||||
(void *)server_keylog_callback))
|
||||
if (!TEST_true(SSL_CTX_get_keylog_callback(sctx)
|
||||
== server_keylog_callback))
|
||||
goto end;
|
||||
|
||||
/* Now do a handshake and check that the logs have been written to. */
|
||||
|
Loading…
Reference in New Issue
Block a user