summaryrefslogtreecommitdiff
path: root/src/netops.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * more getaddrinfo compatibilityChris Young2012-06-201-4/+6
| |
| * getaddrinfo() replacement functionsChris Young2012-06-201-35/+86
| |
| * More changes resulting from pull requestChris Young2012-06-141-1/+1
| |
| * Updates from comments on OS4 compatibility pull request ↵Chris Young2012-06-141-19/+26
| | | | | | | | http://github.com/libgit2/libgit2/pull/766
| * Make this more generic and mergeable.Chris Young2012-06-131-6/+6
| | | | | | | | | | | | | | | | | | Needs AmigaOS.cmake now from CMake package at OS4Depot, or contents below: --8<-- SET(AMIGA 1) SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") --8<--
| * Fix gethostbyname compatibilityChris Young2012-06-091-2/+10
| |
| * horrid gethostbyname compatibilityChris Young2012-06-071-4/+30
| |
* | Fix compile errors when building on windowsTim Clem2012-06-151-1/+0
|/ | | | Errors were due to not including winsock2 early enough.
* Fix compilation warningnulltoken2012-06-071-1/+3
|
* Don't include arpa/inet.h on WindowsCarlos Martín Nieto2012-06-061-1/+1
|
* Merge pull request #697 from carlosmn/sslVicent Martí2012-06-051-7/+313
|\ | | | | Add HTTPS support
| * ssl: allow skipping the server certificate checkCarlos Martín Nieto2012-05-261-1/+1
| | | | | | | | | | Sometimes it's useful not to perform the check. Allow it to be configurable.
| * ssl: look up the last CN the alternative names don't matchCarlos Martín Nieto2012-05-191-11/+54
| |
| * ssl: add support for certificates issues to an IP addressCarlos Martín Nieto2012-05-191-7/+32
| |
| * ssl: remove GnuTLS supportCarlos Martín Nieto2012-05-191-91/+12
| | | | | | | | | | | | It's too much work for now to redo everything. Move the ssl context struct to transport.h
| * ssl: match host names according to RFC 2818 (HTTP over TLS)Carlos Martín Nieto2012-05-191-9/+17
| |
| * ssl: check certificates against the system's trusted CAsCarlos Martín Nieto2012-05-191-3/+105
| |
| * ssl: teardown the connection on closeCarlos Martín Nieto2012-05-191-7/+31
| | | | | | | | | | This should help us free some resources, though the libraries do keep some buffers allocated regardless.
| * https: make it work with OpenSSL as wellCarlos Martín Nieto2012-05-191-5/+73
| | | | | | | | Add specific functions that use OpenSSL instead of GnuTLS
| * http: add https support when GnuTLS is availableCarlos Martín Nieto2012-05-191-7/+122
| | | | | | | | | | | | | | | | If it's not available, an error saying so will be returned when trying to use a https:// URL. This also unifies a lot of the network code to use git_transport in many places instead of an socket descriptor.
* | Use lowercase names for Windows headersScott J. Goldman2012-05-261-2/+2
|/ | | | Otherwise we can't cross-compile on Linux.
* Minor error fixesCarlos Martín Nieto2012-05-081-1/+1
| | | | | | | Clear the error in pkt when we notice that the remote is starting to send the packfile. Fix the format string for Windows networking errors.
* Define explicit _WIN32_WINNT version in makefileScott J. Goldman2012-05-071-1/+0
| | | | | | | | | Previously, it was defined in netops.c, but it's also needed in one of the clar tests, so I figured we might as well just make it global for the whole project. Without it, the mingw32 linker won't resolve GetProcessId() (called from the core/errors.c clar test) because of some conditionals in windows.h.
* Merge remote-tracking branch 'scottjg/fix-mingw32' into developmentVicent Martí2012-05-051-4/+7
|\ | | | | | | | | | | | | | | Conflicts: src/netops.c src/netops.h src/transports/http.c tests-clar/clar
| * Fix gitno_connect() error handling on WindowsScott J. Goldman2012-05-051-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | gitno_connect() can return an error or socket, which is fine on most platforms where sockets are file descriptors (signed int), but on Windows, SOCKET is an unsigned type, which is problematic when we are trying to test if the socket was actually a negative error code. This fix seperates the error code and socket in gitno_connect(), and fixes the error handling in do_connect() functions to compensate. It appears that git_connect() and the git-transport do_connect() functions had bugs in the non-windows cases too (leaking sockets, and not properly reporting connection error, respectively) so I went ahead and fixed those too.
* | Fix warnings on 64-bit windows buildsRussell Belfer2012-04-171-34/+24
| | | | | | | | | | This fixes all the warnings on win64 except those in deps, which come from the regex code.
* | netops: show winsock error messages on WindowsCarlos Martín Nieto2012-04-111-3/+23
| |
* | error-handling: netopsCarlos Martín Nieto2012-04-111-31/+29
|/
* Update Copyright headerschu2012-02-131-1/+1
| | | | Signed-off-by: schu <schu-github@schulog.org>
* Fix the build on EmscriptenEhsan Akhgari2012-02-021-0/+1
| | | | | struct timeval is used in this file, which requires <sys/time.h> to be included.
* global: Properly use `git__` memory wrappersVicent Marti2011-10-281-1/+1
| | | | | Ensure that all memory related functions (malloc, calloc, strdup, free, etc) are using their respective `git__` wrappers.
* pkt: get rid of the chunked supportCarlos Martín Nieto2011-10-121-14/+0
| | | | | | It was a bad idea. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* http: parse the response from the serverCarlos Martín Nieto2011-10-121-2/+2
| | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* net,pkt: add chunked supportCarlos Martín Nieto2011-10-121-0/+16
| | | | | | | | | As we don't know the length of the message we want to send to the other end, we send a chunk size before each message. In later versions, sending the wants might benefit from batching the lines together. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* netops: abstract away socket closingCarlos Martín Nieto2011-10-011-0/+12
| | | | | | | Winsock wants us to use closesocket() instead of close(), so introduce the gitno_close function, which does the right thing. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Initialise the winsock DLLCarlos Martín Nieto2011-10-011-3/+9
| | | | | | | | Windows wants us to initialise the networking DLL before we're allowed to send data through a socket. Call WSASetup and WSACleanup if GIT_WIN32 is defined. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* netops: Use pragmas only in MSVCVicent Marti2011-09-291-9/+11
|
* Merge pull request #405 from carlosmn/http-lsVicent Martí2011-09-221-2/+33
|\ | | | | Implement ls-remote over HTTP
| * netops: store the error if gitno_send failsCarlos Martín Nieto2011-09-091-1/+1
| | | | | | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
| * netops: don't try to free addrinfo on DNS errorCarlos Martín Nieto2011-09-091-0/+1
| | | | | | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
| * netops: get rid of the len - 1 limitationCarlos Martín Nieto2011-09-091-1/+1
| | | | | | | | | | | | | | This was as a result of the pkt code using string functions where they shouldn't. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
| * Move extract_host_and_port to netops and add default port argumentCarlos Martín Nieto2011-09-041-0/+30
| | | | | | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Cleanup legal dataVicent Marti2011-09-191-21/+3
|/ | | | | | | | | | 1. The license header is technically not valid if it doesn't have a copyright signature. 2. The COPYING file has been updated with the different licenses used in the project. 3. The full GPLv2 header in each file annoys me.
* netops: Use the size_t, LukeVicent Marti2011-08-301-5/+7
|
* Fix Windows compilationCarlos Martín Nieto2011-08-301-0/+16
| | | | | | | | | Sockets on Windows are unsigned, so define a type GIT_SOCKET which is signed or unsigned depending on the platform. Thanks to Em for his patience with this. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Actually implement object negotiationCarlos Martín Nieto2011-08-181-1/+1
| | | | | | | | Only signal that we need a pack if we do need it and don't send a want just because it's the first. If we don't need to download the pack, then we can skip all of the negotiation and just return success. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Fix network MSYS compilationCarlos Martín Nieto2011-07-061-1/+2
| | | | | | | | | | | | | MSYS/MinGW uses winsock but obviously doesn't set _MSC_VER. Use _WIN32 to decide whether to use winsock or BSD headers. Also remove these headers from src/transport_git.c altogether, as they are not needed. MSYS is very conservative, so we have to tell it that we don't care about versions of Windows lower than WindowsXP. We also need to tell CMake to add ws2_32 to the libraries list and we shouldn't add the -fPIC option, to MSYS because it complains that it does it anyway. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Use gitno_buffer in the git transportCarlos Martín Nieto2011-06-271-7/+7
| | | | | | This allows us to leave out the buffer handling logic. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Add gitno_buffer as a recv wrapperCarlos Martín Nieto2011-06-271-0/+47
| | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Implement and use gitno_sendCarlos Martín Nieto2011-06-261-3/+24
|