Merge pull request #22093 from mehrdada/ssl_transport_security

Fix mixed-signed comparison in security code
pull/22112/head
Mehrdad Afshari 5 years ago committed by GitHub
commit 5312a3aeb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/core/tsi/ssl_transport_security.cc

@ -1122,7 +1122,8 @@ static void tsi_ssl_handshaker_factory_init(
tsi_result tsi_ssl_get_cert_chain_contents(STACK_OF(X509) * peer_chain,
tsi_peer_property* property) {
BIO* bio = BIO_new(BIO_s_mem());
for (int i = 0; i < sk_X509_num(peer_chain); i++) {
const auto peer_chain_len = sk_X509_num(peer_chain);
for (auto i = decltype(peer_chain_len){0}; i < peer_chain_len; i++) {
if (!PEM_write_bio_X509(bio, sk_X509_value(peer_chain, i))) {
BIO_free(bio);
return TSI_INTERNAL_ERROR;

Loading…
Cancel
Save