1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00
irssi/src/core
Alexander Færøy 5146ce9631
Add x509 certificate and public key pinning support.
This patch adds two new options to /CONNECT and /SERVER to let the user
pin either an x509 certificate and/or the public key of a given server.

It is possible to fetch the certificate outside of Irssi itself to
verify the checksum. To fetch the certificate call:

    $ openssl s_client -connect chat.freenode.net:6697 < /dev/null 2>/dev/null | \
      openssl x509 > freenode.cert

This will download chat.freenode.net:6697's TLS certificate and put it into the
file freenode.cert.

-tls_pinned_cert
----------------

This option allows you to specify the SHA-256 hash of the x509
certificate. When succesfully connected to the server, irssi will verify
that the given server certificate matches the pin set by the user.

The SHA-256 hash of a given certificate can be verified outside of irssi
using the OpenSSL command line tool:

    $ openssl x509 -in freenode.cert -fingerprint -sha256 -noout

-tls_pinned_pubkey
------------------

This option allows you to specify the SHA-256 hash of the subject public key
information section of the server certificate. This section contains both the
cryptographic parameters for the public key, but also information about the
algorithm used together with the public key parameters.

When succesfully connected to the server, irssi will verify that the
given public key matches the pin set by the user.

The SHA-256 hash of a public key can be verified outside of irssi using
the OpenSSL command line tool:

    $ openssl x509 -in freenode.cert -pubkey -noout | \
      openssl pkey -pubin -outform der | \
      openssl dgst -sha256 -c | \
      tr a-z A-Z

It is possible to specify both -tls_pinned_cert and -tls_pinned_pubkey
together.
2016-10-22 22:01:50 +02:00
..
args.c Remove popt and use glib GOption commandline option parser 2008-02-03 16:48:02 +00:00
args.h Remove popt and use glib GOption commandline option parser 2008-02-03 16:48:02 +00:00
channel-rec.h speed up window_item_find by interning name and removing call to channel_find 2014-06-15 23:37:13 +02:00
channel-setup-rec.h
channels-setup.c Minor adjustments. 2015-12-09 16:16:03 +01:00
channels-setup.h Updated server removal 2015-10-01 22:36:02 +02:00
channels.c Duplicate the code paths for autocommands. 2016-01-24 23:02:40 +01:00
channels.h Duplicate the code paths for autocommands. 2016-01-24 23:02:40 +01:00
chat-commands.c Add x509 certificate and public key pinning support. 2016-10-22 22:01:50 +02:00
chat-protocols.c Replace deprecated g_str[n]casecmp with g_ascii_str[n]cmp. 2014-06-10 12:06:19 -04:00
chat-protocols.h /UPGRADE was broken, changed again the server connection code. 2002-05-20 04:12:12 +00:00
chatnet-rec.h Revert "Network and IPv{4,6} related changes" 2015-09-22 21:59:17 +02:00
chatnets.c add CONFIG_REC to config_node_section* APIs 2015-02-17 09:50:55 +01:00
chatnets.h
commands.c Do not crash on OPTCHAN when item has no server 2016-06-06 16:58:40 +02:00
commands.h Throw an error when a chatnet has no available url 2016-03-19 14:04:53 +01:00
core.c Remove all WIN32 ifdefs (unifdef -UWIN32) 2015-12-09 15:20:59 -03:00
core.h Cleanup option handling. 2007-05-24 00:25:36 +00:00
expandos.c module check irssi version 2015-12-10 00:52:33 +01:00
expandos.h Exported expando interface to perl. Fix for statusbar deinit. 2002-10-27 22:30:41 +00:00
ignore.c Replace strarray_length with g_strv_length 2016-06-05 16:24:55 +02:00
ignore.h Don't break the API. 2016-01-03 21:26:57 +01:00
levels.c Change all strcmp() to g_strcmp0() to handle nulls gracefully 2015-04-07 22:41:05 -03:00
levels.h Reject invalid level specifications in /set. 2009-02-21 21:17:51 +00:00
line-split.c Always use g_realloc rather than using g_malloc when the pointer 2008-04-02 11:07:03 +00:00
line-split.h
log-away.c Include write-buffer.h in log-away.c 2015-10-03 14:32:38 +02:00
log.c Replace mkpath with g_mkdir_with_parents 2016-06-05 16:24:55 +02:00
log.h Create log file directories using /set log_create_file_mode + exec-bit. 2002-11-21 20:18:24 +00:00
Makefile.am Add TLS_REC. 2016-10-22 20:37:33 +02:00
masks.c Replace deprecated g_str[n]casecmp with g_ascii_str[n]cmp. 2014-06-10 12:06:19 -04:00
masks.h
misc.c Add function to convert a buffer to a colon-delimited hex string. 2016-10-22 20:36:50 +02:00
misc.h Add function to convert a buffer to a colon-delimited hex string. 2016-10-22 20:36:50 +02:00
module.h
modules-load.c module check irssi version 2015-12-10 00:52:33 +01:00
modules-load.h
modules.c Change all strcmp() to g_strcmp0() to handle nulls gracefully 2015-04-07 22:41:05 -03:00
modules.h module check irssi version 2015-12-10 00:52:33 +01:00
net-disconnect.c Remove all WIN32 ifdefs (unifdef -UWIN32) 2015-12-09 15:20:59 -03:00
net-disconnect.h Move net_disconnect_later declaration from network.h to net-disconnect.h. 2008-03-29 10:25:15 +00:00
net-nonblock.c Remove all WIN32 ifdefs (unifdef -UWIN32) 2015-12-09 15:20:59 -03:00
net-nonblock.h Revert "Network and IPv{4,6} related changes" 2015-09-22 21:59:17 +02:00
net-sendbuffer.c Remove all WIN32 ifdefs (unifdef -UWIN32) 2015-12-09 15:20:59 -03:00
net-sendbuffer.h typo fixes - https://github.com/vlajos/misspell_fixer 2014-11-08 22:26:53 +00:00
network-openssl.c Add x509 certificate and public key pinning support. 2016-10-22 22:01:50 +02:00
network.c net_gethosterror: Handle EAI_SYSTEM ("System error") properly 2016-04-07 07:26:19 -03:00
network.h Deprecate net_connect() 2016-06-05 22:47:04 +02:00
nick-rec.h Allow storing multiple "other" prefixes such as +q and +a. 2008-11-28 00:16:51 +00:00
nicklist.c Fix return value from nick_match_msg_everywhere, remove #include 'settings.h' 2015-09-22 23:16:41 +02:00
nicklist.h Add new setting to optionally modify behaviour of hilight_nick_matches 2015-09-22 22:49:50 +02:00
nickmatch-cache.c Oops. Update address correctly now. 2007-05-08 18:41:10 +00:00
nickmatch-cache.h
pidwait.c Rewrite pidwait using g_child_watch_add. 2008-12-30 11:51:27 +00:00
pidwait.h
queries.c Replace deprecated g_str[n]casecmp with g_ascii_str[n]cmp. 2014-06-10 12:06:19 -04:00
queries.h
query-rec.h typo fixes - https://github.com/vlajos/misspell_fixer 2014-11-08 22:26:53 +00:00
rawlog.c Check the return value of open() in rawlog.c 2016-06-05 16:24:55 +02:00
rawlog.h
recode.c Try to split long lines on spaces 2014-10-19 17:03:20 +02:00
recode.h Try to split long lines on spaces 2014-10-19 17:03:20 +02:00
server-connect-rec.h Add x509 certificate and public key pinning support. 2016-10-22 22:01:50 +02:00
server-rec.h Properly split long IRC messages 2014-07-06 23:24:09 +02:00
server-setup-rec.h Add x509 certificate and public key pinning support. 2016-10-22 22:01:50 +02:00
servers-reconnect.c Add x509 certificate and public key pinning support. 2016-10-22 22:01:50 +02:00
servers-reconnect.h
servers-setup.c Add x509 certificate and public key pinning support. 2016-10-22 22:01:50 +02:00
servers-setup.h Updated server removal 2015-10-01 22:36:02 +02:00
servers.c Add x509 certificate and public key pinning support. 2016-10-22 22:01:50 +02:00
servers.h Revert "Network and IPv{4,6} related changes" 2015-09-22 21:59:17 +02:00
session.c Add x509 certificate and public key pinning support. 2016-10-22 22:01:50 +02:00
session.h Cleanup option handling. 2007-05-24 00:25:36 +00:00
settings.c nullptr when doing module backward compat on invalid config 2016-09-25 23:17:20 +02:00
settings.h Add a CHOICE type to the settings system. 2016-06-12 16:18:33 +02:00
signals.c Oops. Update address correctly now. 2007-05-08 18:41:10 +00:00
signals.h
special-vars.c Replace strarray_length with g_strv_length 2016-06-05 16:24:55 +02:00
special-vars.h Make get_alignment() available outside special-vars.c 2016-05-13 03:51:48 +02:00
tls.c Add TLS_REC. 2016-10-22 20:37:33 +02:00
tls.h Add TLS_REC. 2016-10-22 20:37:33 +02:00
utf8.c fix dist compilation failure 2016-05-18 16:50:41 +02:00
utf8.h Convert string policies from #define to enum. 2016-05-13 17:35:47 +02:00
wcwidth.c fix dist compilation failure 2016-05-18 16:50:41 +02:00
window-item-def.h
window-item-rec.h speed up window_item_find by interning name and removing call to channel_find 2014-06-15 23:37:13 +02:00
write-buffer.c Check return values from some syscalls and warn if they fail 2014-07-06 21:52:03 +01:00
write-buffer.h