OpenSSL: Clean up one part from the BoringSSL patch

The (int) typecast I used with sk_GENERAL_NAME_num() to complete the
BoringSSL compilation was not really the cleanest way of doing this.
Update that to use stack_index_t variable to avoid this just like the
other sk_*_num() calls.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2014-10-07 11:44:56 +03:00
parent a8572960a9
commit 98a1571d88

View File

@ -1217,6 +1217,7 @@ static int tls_match_suffix(X509 *cert, const char *match)
GENERAL_NAME *gen;
void *ext;
int i;
stack_index_t j;
int dns_name = 0;
X509_NAME *name;
@ -1224,8 +1225,8 @@ static int tls_match_suffix(X509 *cert, const char *match)
ext = X509_get_ext_d2i(cert, NID_subject_alt_name, NULL, NULL);
for (i = 0; ext && i < (int) sk_GENERAL_NAME_num(ext); i++) {
gen = sk_GENERAL_NAME_value(ext, i);
for (j = 0; ext && j < sk_GENERAL_NAME_num(ext); j++) {
gen = sk_GENERAL_NAME_value(ext, j);
if (gen->type != GEN_DNS)
continue;
dns_name++;