Fixed key pair loading crash with SILC Plugin when key pair
authorPekka Riikonen <priikone@silcnet.org>
Fri, 1 Jun 2007 21:57:13 +0000 (21:57 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Fri, 1 Jun 2007 21:57:13 +0000 (21:57 +0000)
loading fails.
Fixed help and script installation paths with SILC Client.

CHANGES
apps/irssi/docs/help/Makefile.am.gen
apps/irssi/scripts/Makefile.am
apps/irssi/scripts/examples/Makefile.am
apps/irssi/src/Makefile.am
apps/irssi/src/silc/core/clientutil.c
apps/irssi/src/silc/core/silc-core.c

diff --git a/CHANGES b/CHANGES
index 4620accc5725e2d952da3027b47e2e95db08380f..fb5fd2e9c352a4ca68140d5c09e36803bbd69783 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,21 @@
+Sat Jun  2 00:51:57 EEST 2007  Pekka Riikonen <priikone@silcnet.org>
+
+       * If public key/private key loading fails set the return
+         pointer to NULL.  Affected file is lib/silccrypt/silcpkcs.c.
+
+       * If private key loading fails in silc_load_key_pair free the
+         loaded public key.  Affected file is
+         lib/silcapputil/silcapputil.c.
+
+       * Fixed key pair loading crash with SILC Plugin if key pair
+         loading fails.  Affected file is
+         apps/irssi/src/silc/core/silc-core.c.
+
+       * Fixed SILC Client help and script file installation path
+         to go to prefix/share/silc.  Affected files are
+         apps/irssi/src/scripts/Makefile.am and
+         apps/irssi/docs/help/Makefile.am.gen.
+
 Thu May 31 16:49:13 EEST 2007  Pekka Riikonen <priikone@silcnet.org>
 
        * Fixed UTC offset minutes to be actually minutes.  Affected
index b00fe062ece5b5b020776eec2036d0109b4c4ed0..ff9b0e0d28285ccf3d0b4316382938164f3cb347 100644 (file)
@@ -5,8 +5,8 @@ helpdir = $(datadir)/irssi/help/silc
 SILCHELP = silc
 ED =
 else
-helpdir = $(datadir)/irssi/help
-SILCHELP = 
+helpdir = $(datadir)/silc/help
+SILCHELP =
 ED = silc
 endif
 
index 97a79916a4fe7efc77c9530100152963f1ca192d..69fa88a4d6678c14d22051aca31863b544c73569 100644 (file)
@@ -1,6 +1,10 @@
 SUBDIRS = examples
 
+if SILCPLUGIN
 scriptdir = $(datadir)/irssi/scripts
+else
+scriptdir = $(datadir)/silc/scripts
+endif
 
 script_DATA = \
        autoop.pl \
index c8d8c8e06c8cf430af4c35105af32a74f307d359..82362a0c35799d2cd7c2ee6d5c522571920e7cda 100644 (file)
@@ -1,4 +1,9 @@
+
+if SILCPLUGIN
 scriptdir = $(datadir)/irssi/scripts
+else
+scriptdir = $(datadir)/silc/scripts
+endif
 
 script_DATA = \
        command.pl \
index 13de33af3ffc11bbc609ec74bb7064af7961a8c2..d1b8d6a71936f3b1e64eb136b88766341c63721a 100644 (file)
@@ -17,9 +17,6 @@ else
 SBDRS=lib-popt lib-config core
 endif
 
-pkginc_srcdir=$(pkgincludedir)/src
-pkginc_src_HEADERS = \
-       common.h
 noinst_HEADERS = \
        common.h
 
index 58ec608f8cfd3a8d1515ab9bba37660c2dcca6dc..836347338a3457deaa8af281f5d37ef4d6775dc1 100644 (file)
@@ -52,7 +52,7 @@ void silc_client_print_list(char *list)
   int i=0;
 
   items = g_strsplit(list, ",", -1);
-  
+
   while (items[i] != NULL)
     printformat_module("fe-common/silc", NULL, NULL,
                       MSGLEVEL_CRAP, SILCTXT_CONFIG_LIST,
@@ -430,7 +430,7 @@ void change_private_key_passphrase(const char *answer, CREATE_KEY_REC *rec)
                            ENTRY_REDIRECT_FLAG_HIDDEN, rec);
     return;
   }
-  
+
   if ((rec->passphrase == NULL) && (answer) && (*answer != '\0')) {
     rec->passphrase = g_strdup(answer);
     keyboard_entry_redirect((SIGNAL_FUNC) change_private_key_passphrase,
@@ -454,7 +454,7 @@ void change_private_key_passphrase(const char *answer, CREATE_KEY_REC *rec)
   }
 
   if (silc_change_private_key_passphrase(rec->file, rec->old,
-                                    (rec->passphrase == NULL ? 
+                                    (rec->passphrase == NULL ?
                                      "" : rec->passphrase)) == TRUE)
     printformat_module("fe-common/silc", NULL, NULL,
                       MSGLEVEL_CRAP, SILCTXT_CONFIG_PASSCHANGE);
index 3f7677f265a1064ac367b09a249bdf563b4a8dbe..07385ed41ee3587312318ac2fc87e9520676ef7f 100644 (file)
@@ -826,7 +826,9 @@ void silc_core_deinit(void)
 
   chat_protocol_unregister("SILC");
 
-  silc_pkcs_public_key_free(irssi_pubkey);
-  silc_pkcs_private_key_free(irssi_privkey);
+  if (irssi_pubkey)
+    silc_pkcs_public_key_free(irssi_pubkey);
+  if (irssi_privkey)
+    silc_pkcs_private_key_free(irssi_privkey);
   silc_client_free(silc_client);
 }