jgit/org.eclipse.jgit.junit.http
Thomas Wolf d946f95c9c Handle SSL handshake failures in TransportHttp
When a https connection could not be established because the SSL
handshake was unsuccessful, TransportHttp would unconditionally
throw a TransportException.

Other https clients like web browsers or also some SVN clients
handle this more gracefully. If there's a problem with the server
certificate, they inform the user and give him a possibility to
connect to the server all the same.

In git, this would correspond to dynamically setting http.sslVerify
to false for the server.

Implement this using the CredentialsProvider to inform and ask the
user. We offer three choices:

1. skip SSL verification for the current git operation, or
2. skip SSL verification for the server always from now on for
   requests originating from the current repository, or
3. always skip SSL verification for the server from now on.

For (1), we just suppress SSL verification for the current instance of
TransportHttp.

For (2), we store a http.<uri>.sslVerify = false setting for the
original URI in the repo config.

For (3), we store the http.<uri>.sslVerify setting in the git user
config.

Adapt the SmartClientSmartServerSslTest such that it uses this
mechanism instead of setting http.sslVerify up front.

Improve SimpleHttpServer to enable setting it up also with HTTPS
support in anticipation of an EGit SWTbot UI test verifying that
cloning via HTTPS from a server that has a certificate that doesn't
validate pops up the correct dialog, and that cloning subsequently
proceeds successfully if the user decides to skip SSL verification.

Bug: 374703
Change-Id: Ie1abada9a3d389ad4d8d52c2d5265d2764e3fb0e
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2017-09-13 23:23:08 +02:00
..
.settings Partially revert c0ad77d8 "Enhance Eclipse save actions" 2017-08-30 03:07:18 +02:00
META-INF Add support to follow HTTP redirects 2017-08-17 22:16:44 +02:00
src/org/eclipse/jgit/junit/http Handle SSL handshake failures in TransportHttp 2017-09-13 23:23:08 +02:00
.classpath Change JGit minimum execution environment to JavaSE-1.8 2016-09-20 11:32:36 +02:00
.gitignore Introduce http test bundle 2010-12-08 16:20:28 +01:00
.project Enforce the use of Java5 API:s only (with a few exceptions) 2011-12-16 01:01:36 +01:00
BUILD Bazel: Restrict src globs to Java source files 2017-04-13 14:14:55 +09:00
build.properties Fix line endings 2013-05-03 16:19:07 +02:00
plugin.properties Fix plugin provider names to conform with release train requirement 2013-04-08 23:05:36 +02:00
pom.xml Prepare 4.9.0-SNAPSHOT builds 2017-05-30 13:42:07 +02:00