irssi/irssi-0.8.15-ssl-passphrase.patch
Marcus Rueckert d21d31713b - update to 0.8.16
+ Add -noautosendcmd to /SERVER and /CONNECT. Passing this option
    will force Irssi to not execute the content of the autosendcmd
    chatnet-setting upon connect.
  + Accept names replies with nick!user@host instead of just nick,
    if they are enabled (see bug #805).
  - Set window binds for channel items as sticky when re-creating
    window binds as part of /layout save. This fixes the bug where
    previously saved channel windows forgets their window number
    upon reconnect.
  + Add experimental support for DNSSEC DANE validation of
    certificates.
  + Strip the argument for boolean options (see bug #769).
  + Freenode have been readded to the list of networks in the
    default configuration file.
  + Disabled support for the insecure SSLv2 protocol.
  + Various documentation enhancements.
  + Add -ssl_pass to /connect and /server (see bug #305).
  - Fix crashing bug that can happen if the terminal height
    decreases before the first window is created.
  - Fixed minor compiler warnings.
  - Fixed possible crashing bug when processing an octal escape
    sequence.
  - Fixed the /ignore -network option (see bug #748).
  - Fixed signal handling for /exec'd commands. Irssi now sends the
    signal to the process group id instead of the process id.
  - Fixed segfault generated by SSL disconnections (see bug #752).
  - Fix compilation when build with -Werror=format-security. Patch
    by Jaroslav Skarvada.
- refreshed irssi-0.8.15-ssl-passphrase.patch to apply without fuzz

OBS-URL: https://build.opensuse.org/package/show/server:irc/irssi?expand=0&rev=52
2014-07-14 23:49:29 +00:00

34 lines
1.2 KiB
Diff

From: http://bugs.irssi.org/index.php?do=details&task_id=305
-> http://bugs.irssi.org/index.php?getfile=298
Redraw logic removed.
Index: src/core/network-openssl.c
===================================================================
--- src/core/network-openssl.c.orig
+++ src/core/network-openssl.c
@@ -418,6 +418,16 @@ static GIOFuncs irssi_ssl_channel_funcs
irssi_ssl_get_flags
};
+static int getpass_cb(char *buf, int size, int rwflag, void *keyname)
+{
+ char *pp, prompt[256];
+ snprintf(prompt, 256, "Enter PEM pass phrase:"); // for %s:", keyname);
+ pp = getpass(prompt);
+ strncpy(buf, pp, size);
+ buf[size - 1] = '\0';
+ return(strlen(buf));
+}
+
static gboolean irssi_ssl_init(void)
{
SSL_library_init();
@@ -484,6 +494,8 @@ static GIOChannel *irssi_ssl_get_iochann
scert = convert_home(mycert);
if (mypkey && *mypkey)
spkey = convert_home(mypkey);
+ SSL_CTX_set_default_passwd_cb(ctx, getpass_cb);
+ SSL_CTX_set_default_passwd_cb_userdata(ctx, spkey);
if (! SSL_CTX_use_certificate_file(ctx, scert, SSL_FILETYPE_PEM))
g_warning("Loading of client certificate '%s' failed: %s", mycert, ERR_reason_error_string(ERR_get_error()));
else if (! SSL_CTX_use_PrivateKey_file(ctx, spkey ? spkey : scert, SSL_FILETYPE_PEM))