提交 19599138 编写于 作者: B Ben Kaduk 提交者: Matt Caswell

sslapitest: don't leak the SSL_CTX pair

We have no need for a new set of SSL_CTXs in test_ccs_change_cipher(), so
just keep using the original ones.  Also, fix a typo in a comment.

[extended tests]
Reviewed-by: NMatt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11336)

(cherry picked from commit b3e6d666e351d45e93d29fe3813245b92a0f5815)
上级 2f0dab7e
...@@ -596,7 +596,7 @@ end: ...@@ -596,7 +596,7 @@ end:
* Very focused test to exercise a single case in the server-side state * Very focused test to exercise a single case in the server-side state
* machine, when the ChangeCipherState message needs to actually change * machine, when the ChangeCipherState message needs to actually change
* from one cipher to a different cipher (i.e., not changing from null * from one cipher to a different cipher (i.e., not changing from null
* encryption to reall encryption). * encryption to real encryption).
*/ */
static int test_ccs_change_cipher(void) static int test_ccs_change_cipher(void)
{ {
...@@ -651,12 +651,8 @@ static int test_ccs_change_cipher(void) ...@@ -651,12 +651,8 @@ static int test_ccs_change_cipher(void)
* Now create a fresh connection and try to renegotiate a different * Now create a fresh connection and try to renegotiate a different
* cipher on it. * cipher on it.
*/ */
if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl,
TLS_client_method(), NULL, NULL))
TLS1_VERSION, TLS1_2_VERSION,
&sctx, &cctx, cert, privkey))
|| !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl,
NULL, NULL))
|| !TEST_true(SSL_set_cipher_list(clientssl, "AES128-GCM-SHA256")) || !TEST_true(SSL_set_cipher_list(clientssl, "AES128-GCM-SHA256"))
|| !TEST_true(create_ssl_connection(serverssl, clientssl, || !TEST_true(create_ssl_connection(serverssl, clientssl,
SSL_ERROR_NONE)) SSL_ERROR_NONE))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册