| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Bring together all of the OpenSSL initialization to
git_threads_init() so it's together and doesn't need locks.
Moving it here also gives us libssh2 thread safety (when built against
openssl).
|
|
|
|
| |
OpenSSL's tests init everything in the main thread, so let's do that.
|
|
|
|
|
|
|
|
| |
When using in a multithreaded context, OpenSSL needs to lock, and leaves
it up to application to provide said locks.
We were not doing this, and it's just luck that's kept us from crashing
up to now.
|
|
|
|
|
|
|
|
| |
The OpenSSL init functions are not reentrant, which means that running
multiple fetches in parallel can cause us to crash.
Use a mutex to init OpenSSL, and since we're adding this extra checks,
init it only once.
|
|
|
|
| |
The code doesn't use SSL and a test requires it.
|
|
|
|
|
|
|
|
|
|
| |
It's possible for an encrypted connection not have a certificate. In
this case, SSL_get_verify_result() will return OK because no error
happened (as it never even tried to validate anything).
SSL_get_peer_certificate() will return NULL in this case so we need to
catch that. On the upside, the current code would segfault in this
situation instead of letting it through as a valid cert.
|
|
|
|
|
| |
Specify what we do not like about the certificate. In this case, we do
not like the name.
|
|
|
|
|
| |
This kind of stuff should have unit tests, even if it's just to show
what we expect to match successfully.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
...and have that call manage replaced memory in the output structure.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The subtransport path was relying on pointing to data owned by
the remote which meant that after a redirect, the updated path
was getting lost for future requests. This updates the http
transport to strdup the path and maintain its own lifetime.
This also pulls responsibility for parsing the URL back into the
http transport and isolates the functions that parse and free that
connection data so that they can be reused between the initial
parsing and the redirect parsing.
|
| |
|
|
|
|
|
|
| |
9e9aee6 added an include <netinet/in.h> to fix the build on FreeBSD.
Sometime since then the same header is included ifndef _WIN32, so
remove the duplicate include.
|
|\
| |
| | |
Handle "user@" prefix for credentials partially included in URLs
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
| |
| |
| |
| | |
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
| |
| |
| |
| | |
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|/
|
|
|
|
|
|
| |
W/o this a libgit2 error message could have a mixed encoding:
e.g. a filename in UTF-8 combined with a native Windows error message
encoded with the local code page.
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to man 3 SSL_shutdown / TLS, "If a unidirectional shutdown is
enough (the underlying connection shall be closed anyway), this first
call to SSL_shutdown() is sufficient."
Currently, an unidirectional shutdown is enough, since
gitno_ssl_teardown is called by gitno_close only. Do so to avoid further
errors (by misbehaving peers for example).
Fixes #1129.
|
|
|
|
|
| |
Don't return an error just because GITNO_CONNECT_SSL_NO_CHECK_CERT is
set.
|
|
|
|
|
|
|
| |
3f9eb1e introduced support for SSL certificates issued for IP
addresses, making use of in_addr and in_addr6 structs. On FreeBSD
these are defined in (a file included in) <netinet/in.h>, so include
that file on FreeBSD and get the build working again.
|
|\
| |
| | |
Basic authentication for http and winhttp
|
| | |
|
| | |
|
|/
|
|
|
| |
inet_pton is available only in windows vista or later,
fixed the issue by reimplementing it using WSAStringToAddress
|
| |
|
|
|
|
|
| |
The fetch code takes advantage of this to implement a
progress callback every 100kb of transfer.
|
|
|
|
|
|
|
|
| |
SSL_get_error() allows to receive a result code for various SSL
operations. Depending on the return value (see man (3) SSL_get_error)
there might be additional information in the OpenSSL error queue. Return
the queued message if available, otherwise set an error message
corresponding to the return code.
|
| |
|