pike.git / lib / modules / SSL.pmod / Context.pike

version» Context lines:

pike.git/lib/modules/SSL.pmod/Context.pike:798:      //! Look up a suitable set of certificates for the specified domain.   //! @[UNDEFINED] if no certificate was found.   array(CertificatePair) find_cert_domain(string(8bit) domain)   {    if( domain )    {    if( cert_chains_domain[domain] )    return cert_chains_domain[domain];    -  // Return first matching chain. +  // Return first matching chain that isn't a fallback certificate. +  string best;    foreach(cert_chains_domain; string g; array(CertificatePair) chains) -  if( glob(g, domain) ) +  if( glob(g, domain) && (g != "*") )    return chains;    }       return cert_chains_domain["*"];   }      //! Returns a list of all server certificates added with @[add_cert].   array(CertificatePair) get_certificates()   {    mapping(CertificatePair:int) c = ([]);