Branch: Tag:

2014-05-15

2014-05-15 14:47:45 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Pike 8.0: Fixed SSL port binding with new API.

ctx->certificates does not get set when the new SSL APIs are used.
This caused SSLProtocol::bind() to fail.

Gets rid of the workaround for the above problem.

2500: Inside #if constant(Standards.X509)
   }       if (!bound) { -  Protocol::bind (ignore_eaddrinuse); +  bind (ignore_eaddrinuse);    if (old_cert_failure && bound)    report_notice (LOC_M(64, "TLS port %s opened.\n"), get_url());    if (!bound)
2723:    return 0;    }    + #if constant(SSL.Connection)    protected void bind (void|int ignore_eaddrinuse)    {    // Don't bind if we don't have correct certs. -  +  if (!sizeof(ctx->cert_pairs)) return; +  ::bind (ignore_eaddrinuse); +  } + #else +  protected void bind (void|int ignore_eaddrinuse) +  { +  // Don't bind if we don't have correct certs.    if (!ctx->certificates) return;    ::bind (ignore_eaddrinuse);    } -  + #endif       void create(int pn, string i, void|int ignore_eaddrinuse)    {