This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new 5e0e562  Fix a build issue with BoringSSL (#6988)
5e0e562 is described below

commit 5e0e5626c27805e43824d200ca9f8adf6768ed3d
Author: Masakazu Kitajo <mas...@apache.org>
AuthorDate: Fri Jul 10 09:04:02 2020 +0900

    Fix a build issue with BoringSSL (#6988)
    
    sk_something_num in OpenSSL returns int but the one in BoringSSL returns 
size_t.
    
    (cherry picked from commit da888769f4a83c731e08fdddf5d038cf64fa8b06)
---
 tests/tools/plugins/ssl_client_verify_test.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/tools/plugins/ssl_client_verify_test.cc 
b/tests/tools/plugins/ssl_client_verify_test.cc
index 17668b2..c9de34b 100644
--- a/tests/tools/plugins/ssl_client_verify_test.cc
+++ b/tests/tools/plugins/ssl_client_verify_test.cc
@@ -113,7 +113,8 @@ CB_client_verify(TSCont cont, TSEvent event, void *edata)
     STACK_OF(X509) *chain = X509_STORE_CTX_get1_chain(ctx);
     // X509 *cert = X509_STORE_CTX_get_current_cert(ctx);
     bool retval = false;
-    for (int i = 0; i < sk_X509_num(chain) && !retval; i++) {
+    // BoringSSL has sk_X509_num() return size_t.
+    for (int i = 0; i < static_cast<int>(sk_X509_num(chain)) && !retval; i++) {
       auto cert = sk_X509_value(chain, i);
       retval    = check_names(cert);
     }

Reply via email to