Replace ignore_cert_errors with an SSLConfig-level bool.

ignore_certificate_errors in HttpNetworkSession, which is set by the
--ignore-certificate-errors command-line flag, is currently
implemented by continuing to use the SSLClientSocket after Connect()
fails with a certificate error. Since we currently don't verify until
after the handshake, it's safe to ignore the errors and we still allow
Read() and Write(). At higher levels, we map the certificate errors
back to OK.

This is confusing and will longer work when certificate verification
happens inside the handshake. A certificate error will mean the
handshake hasn't completed. Instead, route the boolean into
SSLClientSocketImpl and map the error to OK there. This allows us to
remove the error-mapping logic at each of the higher levels.

Bug: 347402
Change-Id: I7318e7e9d9e0a3cb0287555b3fd24c9347cc9821
Reviewed-on: https://chromium-review.googlesource.com/c/1343054
Commit-Queue: Jesse Selover <jselover@chromium.org>
Reviewed-by: David Benjamin <davidben@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613232}
9 files changed