[openssl] master update
Dr. Paul Dale
pauli at openssl.org
Tue Feb 22 23:21:49 UTC 2022
The branch master has been updated
via b0317df2311769e02d9ceb4e7afe19521f8ffbf1 (commit)
from a044af49c43ec8fe099deeb5d06501ddf70abf7a (commit)
- Log -----------------------------------------------------------------
commit b0317df2311769e02d9ceb4e7afe19521f8ffbf1
Author: Jiasheng Jiang <jiasheng at iscas.ac.cn>
Date: Mon Feb 21 10:54:29 2022 +0800
test/sslapitest.c: Add check for SSL_CTX_new
As the potential failure of the memory allocation, it should
be better to check the return value of SSL_CTX_new() and return
error if fails, like SSL_CTX_new_ex().
Signed-off-by: Jiasheng Jiang <jiasheng at iscas.ac.cn>
Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17739)
-----------------------------------------------------------------------
Summary of changes:
test/sslapitest.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/test/sslapitest.c b/test/sslapitest.c
index 181d0ef686..8ba5d8125c 100644
--- a/test/sslapitest.c
+++ b/test/sslapitest.c
@@ -8090,8 +8090,12 @@ static int test_cert_cb_int(int prot, int tst)
else
cert_cb_cnt = 0;
- if (tst == 2)
+ if (tst == 2) {
snictx = SSL_CTX_new(TLS_server_method());
+ if (!TEST_ptr(snictx))
+ goto end;
+ }
+
SSL_CTX_set_cert_cb(sctx, cert_cb, snictx);
if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl,
More information about the openssl-commits
mailing list