Commit Graph
161 Commits
Author SHA1 Message Date
louiz’ c65ae47549 Auto accept presence subscription 2016-12-12 00:39:03 +01:00
louiz’ f9c31cb129 The logger writes to std::clog 2016-12-10 03:59:26 +01:00
louiz’ 4cc3dc03fc The config module doesn’t use the logger at all 2016-12-10 03:59:00 +01:00
louiz’ e63f79169b Use an other implementation of a null_stream for the logger 2016-12-09 01:34:46 +01:00
louiz’ e1e740e35e Don’t use global static members but functions that return a reference to an internal static object
See https://github.com/randombit/botan/issues/761
2016-12-08 21:26:42 +01:00
louiz’ 7f2eb60737 Init some members of TcpClientSocketHandler 2016-12-08 18:41:12 +01:00
louiz’ 7a8b4e37a5 In time.cpp, use the en_US.UTF-8 locale, instead of en_US.utf-8
(which apparently doesn’t work on freebsd)
2016-12-08 02:53:39 +01:00
louiz’ 807ac95e79 Use a portable way to get the relative paths into __FILENAME__ 2016-12-08 02:33:35 +01:00
louiz’ 75778f4187 Add some missing includes 2016-12-07 18:29:02 +01:00
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’ b5beb04332 Remove a never reached (and non-sensical) error 2016-11-07 21:57:39 +01:00
louiz’ a52baa52e2 Workaround for debian and other old OS that do not have std::put_time 2016-11-07 20:26:28 +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’ ae02e58b9d Some cleanups 2016-10-31 14:03:37 +01:00
louiz’ 8c26b4d19f Remove unused roster code 2016-10-31 02:01:01 +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’ ac61450184 Refactor remove_invalid_xml_chars to use correct types directly 2016-10-27 01:37:55 +02:00
louiz’ 6d5d7eff68 Directly use Botan::byte instead of char, to avoid an unnecessary cast 2016-10-27 01:15:26 +02:00
louiz’ 021f025cb0 Refactor the sha1 digest into its own function, and do not use sprintf 2016-10-26 21:19:53 +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’ c54f28d29d Conditionally use strptime if we don’t have std::get_time 2016-10-11 21:00:56 +02:00
louiz’ dfc0793ef2 Include a private and no-copy nodes in private <message/> to avoid carbon duplication 2016-10-11 00:43:46 +02:00
louiz’ 548e4ad473 Parse the timezone myself, instead of using the broken strptime
See

https://lab.louiz.org/louiz/biboumi/issues/3215
https://github.com/andikleen/glibc/blob/master/time/strptime_l.c#L746-L747

for why strptime() sucks

We use std::get_time now, to parse the date and time. And we parse the
timezone by hand.

fix #3215
2016-10-11 00:20:43 +02:00
louiz’ 8ac8d2b242 Correctly set status="110" in the presence for the target of a kick 2016-10-07 23:28:40 +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’ 1d197ff26c Respond to muc#traffic requests
fix #3069
2016-10-04 19:32:45 +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