Branch: Tag:

2015-12-04

2015-12-04 09:43:04 by Henrik Grubbström (Grubba) <grubba@grubba.org>

SSL.Connection: Code clean up and improved robustness.

266:    // This data isn't actually used internally.    session->cert_data = result;    -  if(result->verified) -  { -  if (session->server_name) { +  if(result->verified && session->server_name && +  sizeof(result->certificates || ({}))) {    array(Standards.X509.TBSCertificate) certs =    [array(Standards.X509.TBSCertificate)](result->certificates);    Standards.X509.TBSCertificate cert = certs[-1];
280:    result->verified = glob(map(globs, lower_case),    lower_case(session->server_name));    } +     return [int(0..1)](result->verified);   }    -  return 0; - } -  +    //! Do handshake processing. Type is one of HANDSHAKE_*, data is the   //! contents of the packet, and raw is the raw packet received (needed   //! for supporting SSLv2 hello messages).