Commit graph

34 commits

Author SHA1 Message Date
William Pitcock b5b4a0e79b client: use sequential connection ids for ssld connections in ssld RPC, instead of the file descriptor
this avoids race conditions when a file descriptor is reused and an ssld worker has not acked that the previous
connection was closed, which results in the new client being kicked.
2015-12-12 05:20:51 -06:00
William Pitcock ebe33dbfab sslproc: set Client.localClient.cipher_string if sent by ssld 2015-12-11 08:19:50 -06:00
William Pitcock 196740c42b sslproc: likewise 2015-12-10 23:44:31 -06:00
William Pitcock 13d8f0edba allow certfp method to be configured 2015-12-07 01:49:30 -06:00
William Pitcock 772c95cc7a ssld: we only will continue supporting one fingerprint method at a time 2015-12-07 01:21:26 -06:00
Elizabeth Myers e6bbb41030 Add ability to change CertFP hash.
Presently this only supports SHA1, as the machinery to actually change
the cipher is not hooked up to anything yet.
2015-12-07 01:14:02 -06:00
Jail Bird 29c92cf95f Spring cleaning redux:
- Implemented changes suggested by Jilles
- Remove some unused parameters in functions
- Remove some unused ssl procs
- 63-bit time_t support in TS deltas
- const char * vs char * cleanup
- struct alignment (void *) casts
- signed vs unsigned fixes
- bad memset() call
- Bad LT_MAIN in libratbox
- char -> unsigned char casts for isdigit/isspace/etc calls

Thanks Jilles!
2015-04-20 00:55:20 -05:00
Aaron Jones 32fb589528 Misc code cleanups
* src/packet.c: Remove a dead store
* src/res.c: Remove a dead store
* src/sslproc.c: Remove a dead store
* src/sslproc.c: Don't call the same accessor twice

These silence some fairly harmless compiler warnings
2015-03-27 23:07:20 +00:00
William Pitcock e861902fd9 libratbox: remove RB_PRNG_EGD in its entirety (closes #85) 2015-03-01 01:05:14 -06:00
Keith Buck 55abcbb20a Remove trailing whitespace from all .c and .h files.
3134 bytes were removed.
2014-03-03 04:25:47 +00:00
Jilles Tjoelker f1709d5ac8 sslproc: Add missing break, still allowing zlib when ssl cannot be set up. 2014-03-02 21:58:38 +01:00
Nathan Phillip Brink c74836dc4a Add explicit support for being installed into a system triggered with --enable-fhs-paths.
Add two mechanism for avoiding name-collisions in a system-wide
installation of charybdis. The ssld and bandb daemons, intended to be
directly used by ircd and not the user, install into libexec when
--enable-fhs-paths is set. For binaries which are meant to be in PATH
(bindir), such as ircd and viconf, there is now an option
--with-program-prefix=progprefix inspired by automake. If the user
specifies --with-program-prefix=charybdis, the ircd binary is named
charybdisircd when installed.

Add support for saving the pidfile to a rundir and storing the ban
database in localstatedir instead of in sysconfdir. This is, again,
conditional on --enable-fhs-paths.

Fix(?) genssl.sh to always write created SSL key/certificate/dh
parameters to the sysconfdir specified during ./configure. The
previous behavior was to assume that the user ran genssl.sh after
ensuring that his current working directory was either sysconfdir or a
sibling directory of sysconfdir.
2012-03-01 02:41:09 +00:00
William Pitcock 481b443b4d Missed a few -Wformat-security warnings. 2012-01-25 13:24:04 -06:00
William Pitcock 32ea9d3d83 Fix some warnings when using -Wformat-security on Alpine. 2012-01-25 13:22:56 -06:00
Jilles Tjoelker 8eda114a78 Pass certfp to other servers and show it in whois. Do not show it on connect.
The server protocol for this is
:<uid> ENCAP * CERTFP :<40 hex chars>
both in new user introductions and in burst.

As in oftc-hybrid, only the user themselves and opers can see the certfp.

Displaying the certfp on connect seems unnecessary to me,
the user can whois themselves if needed.
2010-02-06 00:18:27 +01:00
William Pitcock 11dff8a423 Clarify CertFP message. 2010-01-31 17:35:15 -06:00
Jilles Tjoelker 7247337afa Add certfp support to libratbox and ssld.
This lets a user connect with a client certificate, and
passes the certificate's fingerprint to ircd, which
currently just notices it to the user.

A new ssld->ircd message 'F' is used to pass on the
fingerprint.

This is only for OpenSSL for now, not GNUTLS.
2010-01-31 19:04:20 +01:00
Jilles Tjoelker cf09122bf7 Check the return value on rb_pipe.
from ircd-ratbox (r26515) (androsyn)
2009-05-13 22:07:57 +02:00
Jilles Tjoelker eda22d87af More rb_socketpair() return value checks.
from ircd-ratbox (r26507) (androsyn)
2009-05-12 23:30:46 +02:00
Jilles Tjoelker 07c2bb757d Fix close detection with ssl+zip, porting more code from ircd-ratbox.
This tells the SSL ssld to report connection closure to ircd
using the new fd.
2009-03-07 03:23:17 +01:00
Jilles Tjoelker 4f7a1feeda Fix an off by one error with zipstats processing
from ircd-ratbox (androsyn)
2009-02-07 23:26:05 +01:00
Jilles Tjoelker 42d609f65a [ratbox3 svn r26397] Make it more likely that error messages on ssld connections get through.
When ssld reports a connection closure because of
"Remote host closed the connection" and the connection
is any server or a registered client, try a
read_packet() on the client.
This should mainly help LIBRB_USE_IOTYPE=poll which
iterates over the ready file descriptors in numerical
order, processing the ssld control connection before the
closing data connection.
2009-01-15 20:08:46 +03:00
androsyn 0bd120ed48 [svn r26332] get rid of the zip ready stuff 2009-01-01 14:50:21 +03:00
Aaron Sethman a4165b42bf re-enable ziplinks + ssl 2008-12-13 23:20:59 +03:00
androsyn bdbc903306 cast getpid() to int 2008-12-10 12:46:23 +03:00
Jilles Tjoelker 2a073ca2ed Put back conditionally netwide ssld error snote. 2008-12-03 00:55:58 +01:00
Valeriy Yatsko 3202e24921 Copied libratbox and related stuff from shadowircd upstream. 2008-12-03 02:49:39 +03:00
Valery V Yatsko b924934711 fixed typo in sslproc.c 2008-08-08 20:01:52 +04:00
Jilles Tjoelker 88fc1aeb68 Put back netwide snotes for ssld errors from remote connects. 2008-07-30 14:50:12 +02:00
Valery Yatsko 0862e335a3 sslproc.c synced with ircd-ratbox3 svn 2008-07-30 02:55:08 +04:00
Jilles Tjoelker 81c5873e97 Log ssld errors for servers and handshakes.
(serverlog)
2008-06-30 00:28:00 +02:00
Jilles Tjoelker 2ce698f393 Send ssld error netwide if it was a remote connect and a handshake. 2008-06-29 22:02:32 +02:00
Valery Yatsko 536845c57d Removing UMODE_ALL, replacing all sendto_realops_flags in sslproc.c with snomasks 2008-04-08 20:16:19 +04:00
William Pitcock f845191560 make this compile again 2008-04-06 11:33:34 -05:00