Branch: Tag:

2015-12-03

2015-12-03 15:27:57 by Henrik Grubbström (Grubba) <grubba@grubba.org>

SSL.Connection: Unify the server_name check with cert check.

263:    context->trusted_issuers_cache,    context->require_trust);    +  // This data isn't actually used internally. +  session->cert_data = result; +     if(result->verified)    {    if (session->server_name) {
274:    if (cert->ext_subjectAltName_dNSName) {    globs += cert->ext_subjectAltName_dNSName;    } -  result->server_name_verified = 0; -  foreach(globs, string g) { -  if (glob(g, session->server_name)) { -  result->server_name_verified = 1; -  break; +  result->verified = glob(globs, session->server_name);    } -  +  return [int(0..1)](result->verified);    } -  } -  // This data isn't actually used internally. -  session->cert_data = result; -  return 1; -  } +        return 0;   }