summaryrefslogtreecommitdiff
path: root/src/netops.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge pull request #1048 from pwkelley/basic_authPhilip Kelley2012-11-081-3/+6
|\ | | | | Basic authentication for http and winhttp
| * Fix connection leak in http subtransportPhilip Kelley2012-11-061-3/+6
| |
* | Move inet_pton to posix platform-compatibility layerEduardo Bart2012-11-071-50/+2
| |
* | Fix compilation for mingw32 and cygwinEduardo Bart2012-11-061-2/+50
|/ | | | | inet_pton is available only in windows vista or later, fixed the issue by reimplementing it using WSAStringToAddress
* Reorganize transport architecture (squashed 3)Philip Kelley2012-11-011-80/+111
|
* gitno_buffer: callback on each packetBen Straub2012-10-191-1/+2
| | | | | The fetch code takes advantage of this to implement a progress callback every 100kb of transfer.
* netops: be more careful with SSL errorsMichael Schubert2012-09-041-1/+37
| | | | | | | | 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.
* netops: continue writing on SSL_ERROR_WANT_WRITEMichael Schubert2012-09-041-1/+1
|
* ssl: make cert check ignore work for invalid certs, not just CNsCarlos Martín Nieto2012-08-281-2/+6
| | | | | | | | | | | Passing SSL_VERIFY_PEER makes OpenSSL shut down the connection if the certificate is invalid, without giving us a chance to ignore that error. Pass SSL_VERIFY_NONE and call SSL_get_verify_result if the user wanted us to check. When no CNs match, we used to jump to on_error which gave a bogus error as that's for OpenSSL errors. Jump to cert_fail so we tell the user that the error came from checking the certificate.
* Merge remote-tracking branch 'nulltoken/topic/amd64-compat' into developmentVicent Marti2012-08-021-2/+7
|\ | | | | | | | | | | | | Conflicts: src/netops.c src/netops.h src/oid.c
| * portability: Improve x86/amd64 compatibilitynulltoken2012-07-241-1/+1
| |
* | transport: rename encrypt to use_sslCarlos Martín Nieto2012-07-301-4/+4
| | | | | | | | | | SSL isn't the only way that a transport can be encrypted. The new name will make it easier to merge the SSH support.
* | ssl: use the callback instead of ifs to determine how to get dataCarlos Martín Nieto2012-07-301-40/+31
| | | | | | | | | | Using the callbacks makes it clearer and reduces the amount of #ifdefs and ifs and we need in the code.
* | remote: use the same code to control git and httpCarlos Martín Nieto2012-07-301-2/+15
|/ | | | | | | | This allows us to add capabilitites to both at the same time, keeps them in sync and removes a lot of code. gitno_buffer now uses a callback to fill its buffer, allowing us to use the same interface for git and http (which uses callbacks).
* amigaos: CleanupVicent Marti2012-06-221-96/+4
|
* Merge branch 'pull-req' of https://github.com/chris-y/libgit2 into amigaosVicent Marti2012-06-221-1/+95
|\
| * 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>