summaryrefslogtreecommitdiff
path: root/src/libgit2/streams
Commit message (Collapse)AuthorAgeFilesLines
* win32: use WSAGetLastError to determine blockingEdward Thomson2023-05-131-1/+14
|
* win32: getsockopt takes a `char *` instead of a `void *`Edward Thomson2023-05-131-1/+2
| | | | Monsters.
* posix: introduce p_poll emulation with selectEdward Thomson2023-05-131-5/+4
| | | | Not all systems have poll(2); emulate it with select(2).
* streams: sockets are non-blocking and can timeoutEdward Thomson2023-05-132-25/+190
| | | | | | | | | | | | | | | Make socket I/O non-blocking and add optional timeouts. Users may now set `GIT_OPT_SET_SERVER_CONNECT_TIMEOUT` to set a shorter connection timeout. (The connect timeout cannot be longer than the operating system default.) Users may also now configure the socket read and write timeouts with `GIT_OPT_SET_SERVER_TIMEOUT`. By default, connects still timeout based on the operating system defaults (typically 75 seconds) and socket read and writes block. Add a test against our custom testing git server that ensures that we can timeout reads against a slow server.
* net: move `gitno` buffer to `staticstr`Edward Thomson2023-05-134-6/+3
| | | | | | | | The `gitno` buffer interface is another layer on top of socket reads. Abstract it a bit into a "static string" that has `git_str` like semantics but without heap allocation which moves the actual reading logic into the socket / stream code, and allows for easier future usage of a static / stack-allocated `git_str`-like interface.
* net: move rfc2818 hostname / wildcard matching to utilEdward Thomson2023-05-131-13/+6
|
* stransport: store error informationEdward Thomson2023-05-131-11/+28
| | | | | | We lose some error information from the read / write callbacks to stransport. Store our own error value in the object so that we can ensure that we rely upon it.
* utf8: add conversion with size and refactor namesEdward Thomson2023-03-211-1/+1
| | | | | | | | Add functions to use convert a string with length, instead of assuming NUL termination. In addition, move the utf8 to 16 conversion routines into the `git_utf8` namespace instead of using namespaceless `git__` prefixed names.
* http: introduce schannel streams for windowsEdward Thomson2023-03-215-34/+804
| | | | | | | | | | Provide a stream interface for Schannel - the native crypto APIs - on Windows. This allows Windows to use the same HTTP transport that all the other platforms use, with its own native crypto. Ultimately this allows us to deprecate WinHTTP and we need not add support for our socket changes in two places (our HTTP stack and the WinHTTP stack).
* socket: mark flags as unusedEdward Thomson2023-02-151-1/+2
|
* Merge pull request #6456 from libgit2/ethomson/sha256_experimentalEdward Thomson2023-02-141-1/+3
|\ | | | | SHA256: more SHA256 support
| * transport: teach transports about oid types and SHA256Edward Thomson2023-02-121-1/+3
| |
* | openssl: support OpenSSL 3 in dynamic modeEdward Thomson2023-02-101-3/+7
| | | | | | | | | | | | | | | | | | Try to load OpenSSL 3 libraries when compiled with OpenSSL-Dynamic support. Handle the deprecated symbol renaming of SSL_get_peer_certificate to SSL_get1_peer_certificate -- try to load the old name and if it fails, use the new one.
* | openssl: retry initialization on failureEdward Thomson2023-02-101-1/+1
|/ | | | | | When we fail to initialize the OpenSSL subsystem, don't assume that we're "initialized". Subsequent initialization requests -- if there are any -- should replay initialization and fail again.
* refactor: `src` is now `src/libgit2`Edward Thomson2022-02-2216-0/+3059