Fix a type cast issue for compiling webrtc with BoringSSL.

BUG=
R=juberti@google.com, juberti@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/16039004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6672 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
jiayl@webrtc.org 2014-07-14 16:42:46 +00:00
parent e04cb0eb81
commit 5f43ce6784

View File

@ -712,7 +712,10 @@ bool OpenSSLAdapter::VerifyServerName(SSL* ssl, const char* host,
}
STACK_OF(CONF_VALUE)* value = meth->i2v(meth, ext_str, NULL);
for (int j = 0; j < sk_CONF_VALUE_num(value); ++j) {
// Cast to size_t to be compilable for both OpenSSL and BoringSSL.
for (size_t j = 0; j < static_cast<size_t>(sk_CONF_VALUE_num(value));
++j) {
CONF_VALUE* nval = sk_CONF_VALUE_value(value, j);
// The value for nval can contain wildcards
if (!strcmp(nval->name, "DNS") && string_match(host, nval->value)) {