Commit Graph
72 Commits
Author SHA1 Message Date
louiz’ 7784c56843 Update the verify_certificate_chain code to work with botan >= 1.11.34 as well 2016-12-04 22:20:55 +01:00
louiz’ a66c67e291 Add a missing ifdef botan 2016-12-04 16:26:32 +01:00
louiz’ 3ef78f4418 Add some missing botan includes 2016-12-04 16:19:43 +01:00
louiz’ 732f53d798 Clean a few more things 2016-12-04 16:15:21 +01:00
louiz’ 3f53db79c0 Use the new botan 1.11.32 Tls::Client API (but stay compatible with older ones) 2016-12-02 16:50:28 +01:00
louiz’ 5f9568ca20 TLS: Enable ecc point compression
If available in Botan.

There is an issue where, if botan supports it but we don’t enable it, then
the TLS handshake may fail with some servers
2016-12-02 11:30:27 +01:00
louiz’ 5cb534c960 move is_connecting outside of an ifdef 2016-11-16 23:13:37 +01:00
louiz’ 42e85d921b Remove some useless virtual method from SocketHandler 2016-11-16 23:07:27 +01:00
louiz’ 9dd0cf8f7a Fix an error on gcc 4.9, because it is so stupid it can’t find operator""s 2016-11-16 20:28:48 +01:00
louiz’ d90f75dc60 Trivial include cleanup 2016-11-16 20:03:01 +01:00
louiz’ ae445f0e59 Remove an unused variable 2016-11-16 20:02:44 +01:00
louiz’ 4ab3cd653f Fix some little compilation errors with some configs, from last commit 2016-11-15 00:49:55 +01:00
louiz’ d872c2b492 Support the ident protocol
fix #3211
2016-11-15 00:23:19 +01:00
louiz’ ed7e66471f Add missing cstring include for strerror 2016-11-11 03:03:42 +01:00
louiz’ 0c8adc85f7 Move all the connect() logic from TCPSocketHandler into a subclass
This way, TCPSocketHandler only deal with the message sending/receiving, not
the connect() or anything else.  This will be used for implementing servers
(because when a client is accepted, we don’t need all the connect() and dns
resolution stuff).
2016-11-11 02:54:48 +01:00
louiz’ 94cebfcd77 Add a missing <chrono> include 2016-11-07 14:49:51 +01:00
louiz’ 7376831bc8 Add get-irc-connection-info adhoc command
fix #3171
2016-11-07 14:43:07 +01:00
louiz’ f50f50653d Refactor load_certs() 2016-11-01 19:43:56 +01:00
louiz’ 3e7c8ab4bc Trivial cleanup 2016-10-31 01:39:35 +01:00
louiz’ 911258bc65 Make AddrinfoDeleter a class 2016-10-31 01:39:35 +01:00
louiz’ 0d8a2bfd13 Rename a variable that shadows a class member 2016-10-31 01:39:35 +01:00
louiz’ 6d5d7eff68 Directly use Botan::byte instead of char, to avoid an unnecessary cast 2016-10-27 01:15:26 +02:00
louiz’ aa4255224e Optimize tcp_socket::on_send by using vector::erase() only once per call 2016-10-20 20:08:29 +02:00
louiz’ ce06c25e93 Very little optimization by using a simpler scope_guard when possible
The version with the vector, that can be disabled etc, is “very” slow, so we
use unique_ptr when we don’t need to disable it, and when it only contains
one function
2016-10-20 19:32:20 +02:00
louiz’ 827a1eedf8 On EINPROGRESS, we need to also check for read events (because openBSD lies)
“It is possible to select(2) or poll(2) for completion by selecting the
socket for writing”

Yeah, sure, “writing”…
2016-10-12 21:00:05 +02:00
louiz’ 5f2e4820df Fix an off-by-one issue in the POLL code 2016-10-12 21:00:05 +02:00
louiz’ 954d271d50 Fix the argument of strerror after bind()
fix coverity CID 134470
2016-10-06 22:28:25 +02:00
louiz’ 92c99bb9dd Remove a branch that execute identical code in both cases
fix coverity CID 134469
2016-10-06 22:28:25 +02:00
louiz’ 45aebb8d8a Avoid an exception due to some bad logic in the DNS resolution mechanic
fix #3207
2016-10-03 21:12:16 +02:00
louiz’ b29225601a Fix some compilation warning/errors that appear on FreeBSD 2016-10-03 17:58:16 +02:00
louiz’ 11a1c0cc99 Always remove all the DNS sockets on an c-ares event
Because c-ares may close one of its socket, even if it’s not the one that
has the event. Otherwise we may not know when a socket has been removed from
our poller (automatically, when close()ed) and this leads to bugs.
2016-07-28 10:34:01 +02:00
louiz’ de0eff6e94 Revert "Don’t use unique_ptr to store dns socket handlers"
This reverts commit 5328d0806f.
2016-07-27 10:04:15 +02:00
louiz’ fa42d0c178 Bring back DNSSocketHandler's destructor 2016-07-12 11:25:38 +02:00
louiz’ 5328d0806f Don’t use unique_ptr to store dns socket handlers 2016-07-12 11:15:42 +02:00
louiz’ 81f8f45b37 Replace all include guards by #pragma once
It’s $CURRENT_YEAR
2016-07-04 17:53:53 +02:00
louiz’ 5a2e611617 Show off, with some variadic templates, for the logger module 2016-06-13 20:46:30 +02:00
louiz’ 28300dff5b Add a missing vector include 2016-06-08 10:31:19 +02:00
louiz’ 66609cfba2 Remove all usage of std::list 2016-06-08 01:42:43 +02:00
louiz’ fdddd447b3 Use “using” instead of typedef 2016-05-13 01:22:49 +02:00
louiz’ ce798b1e8c Fix build with POLLER=POLL 2016-05-10 12:50:05 +02:00
louiz’ af42073830 Style fix
Move all constructors at the top of classes
2016-05-04 14:16:40 +02:00
louiz’ 73ad709ddf Add a TEMPORARY work-around for botan 1.11.29 2016-04-22 10:49:06 +02:00
Florent Le Coz b47179f125 Fix the ordering of poll callbacks, with ppoll too 2016-02-24 09:31:30 +01:00
Florent Le Coz b29d94444d Close the epoll fd 2016-02-24 09:31:30 +01:00
Florent Le Coz 6ee80ad268 Fix the ordering of poll callbacks (recv, connect, send)
Because if we have a send event to signal the connection sucess + a recv
event to signal something to read on the socket, we need to first finish the
connect process before reading the available data. That’s what we do now.
2016-02-22 17:03:15 +01:00
Florent Le Coz a13285d0ff Rename BasicCredentialManager 2016-02-10 20:10:40 +01:00
Florent Le Coz 0864f2ab99 Quiet a warning 2016-01-13 16:39:08 +01:00
Florent Le Coz 1f8333f23f Support a trusted SHA1 fingerprint to be configured for each IRC server 2016-01-04 13:47:27 +01:00
Florent Le Coz 6a7cd5eecf Do not forget to call freeaddrinfo, fix a memleak
For the getaddrinfo call we added in the previous commit, to convert the IP
provided in the conf.
2015-12-03 20:41:48 +01:00
Florent Le Coz 05a82b810f Display a better error when connection fails
The error should not tell “while reading” when we are just connecting.
2015-12-01 16:09:21 +01:00