[Gpa-commits] r715 - in trunk: . src
scm-commit at wald.intevation.org
scm-commit at wald.intevation.org
Mon Nov 7 22:41:54 CET 2005
Author: marcus
Date: 2005-11-07 22:41:53 +0100 (Mon, 07 Nov 2005)
New Revision: 715
Modified:
trunk/ChangeLog
trunk/README
trunk/configure.ac
trunk/src/ChangeLog
trunk/src/gpabackupop.c
trunk/src/gpakeyselector.c
trunk/src/gpawidgets.c
trunk/src/gpgmetools.c
trunk/src/gpgmetools.h
trunk/src/keylist.c
trunk/src/keyring.c
trunk/src/keysigndlg.c
trunk/src/verifydlg.c
Log:
2005-11-07 Marcus Brinkmann <marcus at g10code.de>
* configure.ac: Require GPGME 0.4.5.
src/
2005-11-07 Marcus Brinkmann <marcus at g10code.de>
* keyring.c (keyring_details_page_fill_key): Use
gpa_gpgme_key_format_fingerprint.
* keysigndlg.c (gpa_key_sign_run_dialog): Likewise.
* gpgmetools.c (dump_data_to_file): Use gpgme_data_seek instead
gpgme_data_rewind.
(dump_data_to_clipboard): Likewise.
(get_gpg_path): Rewritten.
(gpa_gpgme_key_sig_get_level): Use sig_class, not class.
(gpa_key_ownertrust_string): Use key->owner_trust.
(gpa_key_validity_string): Use key->uids->validity and the various
key->subkeys flags.
(gpa_gpgme_key_get_fingerprint): Renamed to ...
(gpa_gpgme_key_format_fingerprint): ... this. Accept only a
string as argument.
* gpgmetools.h (gpa_gpgme_key_get_fingerprint): Replace with ...
(gpa_gpgme_key_format_fingerprint): ... this.
(gpa_gpgme_key_get_short_keyid): Remove IDX argument from prototype.
* gpabackupop.c (gpa_backup_operation_set_property): Adjust caller
of gpa_gpgme_key_get_short_keyid.
* gpakeyselector.c (gpa_key_selector_next_key): Likewise.
* gpawidgets.c (gpa_key_info_new): Likewise.
* keylist.c (gpa_keylist_next): Likewise.
* keyring.c (keyring_details_page_fill_key): Likewise.
(keyring_update_status_bar): Likewise.
* verifydlg.c (add_signature_to_model): Likewise.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2005-10-28 15:15:56 UTC (rev 714)
+++ trunk/ChangeLog 2005-11-07 21:41:53 UTC (rev 715)
@@ -1,3 +1,7 @@
+2005-11-07 Marcus Brinkmann <marcus at g10code.de>
+
+ * configure.ac: Require GPGME 0.4.5.
+
2005-10-26 Werner Koch <wk at g10code.com>
* Makefile.am: Use dist-bzip2 option.
Modified: trunk/README
===================================================================
--- trunk/README 2005-10-28 15:15:56 UTC (rev 714)
+++ trunk/README 2005-11-07 21:41:53 UTC (rev 715)
@@ -8,6 +8,8 @@
public keys.
Copyright (C) 2000-2002 G-N-U GmbH (http://www.g-n-u.de)
+Copyright (C) 2002-2003 Miguel Coca.
+Copyright (C) 2005 g10 Code GmbH.
GPA uses fragments from the following programs and libraries:
JNLIB, Copyright (C) 1998-2000 Free Software Foundation, Inc.
@@ -18,6 +20,8 @@
There is a mailing list devoted to the development of GPA.
See http://www.gnupg.org/gpa.html for more information.
+There is also a project site available at:
+http://wald.intevation.org/projects/gpa/
GPA is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2005-10-28 15:15:56 UTC (rev 714)
+++ trunk/configure.ac 2005-11-07 21:41:53 UTC (rev 715)
@@ -160,7 +160,7 @@
CFLAGS="$CFLAGS $GTK_CFLAGS"],
AC_MSG_ERROR(Cannot find GTK+ 2.0))
-AM_PATH_GPGME(0.4.3,
+AM_PATH_GPGME(0.4.5,
[LIBS="$LIBS $GPGME_LIBS"
CFLAGS="$CFLAGS $GPGME_CFLAGS"],
AC_MSG_ERROR(Cannot find an up to date GPGME))
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2005-10-28 15:15:56 UTC (rev 714)
+++ trunk/src/ChangeLog 2005-11-07 21:41:53 UTC (rev 715)
@@ -1,3 +1,31 @@
+2005-11-07 Marcus Brinkmann <marcus at g10code.de>
+
+ * keyring.c (keyring_details_page_fill_key): Use
+ gpa_gpgme_key_format_fingerprint.
+ * keysigndlg.c (gpa_key_sign_run_dialog): Likewise.
+ * gpgmetools.c (dump_data_to_file): Use gpgme_data_seek instead
+ gpgme_data_rewind.
+ (dump_data_to_clipboard): Likewise.
+ (get_gpg_path): Rewritten.
+ (gpa_gpgme_key_sig_get_level): Use sig_class, not class.
+ (gpa_key_ownertrust_string): Use key->owner_trust.
+ (gpa_key_validity_string): Use key->uids->validity and the various
+ key->subkeys flags.
+ (gpa_gpgme_key_get_fingerprint): Renamed to ...
+ (gpa_gpgme_key_format_fingerprint): ... this. Accept only a
+ string as argument.
+ * gpgmetools.h (gpa_gpgme_key_get_fingerprint): Replace with ...
+ (gpa_gpgme_key_format_fingerprint): ... this.
+ (gpa_gpgme_key_get_short_keyid): Remove IDX argument from prototype.
+ * gpabackupop.c (gpa_backup_operation_set_property): Adjust caller
+ of gpa_gpgme_key_get_short_keyid.
+ * gpakeyselector.c (gpa_key_selector_next_key): Likewise.
+ * gpawidgets.c (gpa_key_info_new): Likewise.
+ * keylist.c (gpa_keylist_next): Likewise.
+ * keyring.c (keyring_details_page_fill_key): Likewise.
+ (keyring_update_status_bar): Likewise.
+ * verifydlg.c (add_signature_to_model): Likewise.
+
2005-10-28 Marcus Brinkmann <marcus at g10code.de>
* gpgmetools.c (gpa_gpgme_key_get_userid): Work directly on
Modified: trunk/src/gpabackupop.c
===================================================================
--- trunk/src/gpabackupop.c 2005-10-28 15:15:56 UTC (rev 714)
+++ trunk/src/gpabackupop.c 2005-11-07 21:41:53 UTC (rev 715)
@@ -1,23 +1,27 @@
/* gpabackupop.c - The GpaBackupOperation object.
- * Copyright (C) 2003, Miguel Coca.
- *
- * This file is part of GPA
- *
- * GPA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * GPA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
+ Copyright (C) 2003 Miguel Coca.
+ Copyright (C) 2005 g10 Code GmbH.
+ This file is part of GPA.
+
+ GPA is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ GPA is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GPA; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <gpgme.h>
#include "gpa.h"
#include "i18n.h"
@@ -28,9 +32,9 @@
static gboolean gpa_backup_operation_idle_cb (gpointer data);
-/* GObject boilerplate */
+/* GObject boilerplate. */
-/* Properties */
+/* Properties. */
enum
{
PROP_0,
@@ -79,7 +83,7 @@
op->key = key;
gpgme_key_ref (op->key);
op->fpr = g_strdup (op->key->subkeys->fpr);
- op->key_id = g_strdup (gpa_gpgme_key_get_short_keyid (op->key, 0));
+ op->key_id = g_strdup (gpa_gpgme_key_get_short_keyid (op->key));
}
break;
case PROP_FINGERPRINT:
Modified: trunk/src/gpakeyselector.c
===================================================================
--- trunk/src/gpakeyselector.c 2005-10-28 15:15:56 UTC (rev 714)
+++ trunk/src/gpakeyselector.c 2005-11-07 21:41:53 UTC (rev 715)
@@ -216,7 +216,7 @@
selector->keys = g_list_prepend (selector->keys, key);
store = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (selector)));
/* The Key ID */
- keyid = gpa_gpgme_key_get_short_keyid (key, 0);
+ keyid = gpa_gpgme_key_get_short_keyid (key);
/* The user ID */
userid = gpa_gpgme_key_get_userid (key->uids);
/* Append it to the list */
Modified: trunk/src/gpawidgets.c
===================================================================
--- trunk/src/gpawidgets.c 2005-10-28 15:15:56 UTC (rev 714)
+++ trunk/src/gpawidgets.c 2005-11-07 21:41:53 UTC (rev 715)
@@ -1,31 +1,32 @@
/* gpawidgets.c - The GNU Privacy Assistant
- * Copyright (C) 2000, 2001 G-N-U GmbH.
- *
- * This file is part of GPA
- *
- * GPA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * GPA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
+ Copyright (C) 2000, 2001 G-N-U GmbH.
+ Copyright (C) 2005 g10 Code GmbH.
-/*
- * Functions to construct a number of commonly used but GPA
- * specific widgets
- */
+ This file is part of GPA.
+ GPA is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ GPA is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GPA; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */
+
+/* Functions to construct a number of commonly used but GPA specific
+ widgets. */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "gpa.h"
#include <time.h>
-#include <config.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
@@ -33,11 +34,8 @@
#include "gtktools.h"
-/*
- * A table showing some basic information about the key, such as
- * the key id and the user name
- */
-
+/* A table showing some basic information about the key, such as the
+ key id and the user name. */
GtkWidget *
gpa_key_info_new (gpgme_key_t key)
{
@@ -83,7 +81,7 @@
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, 0, 0, 0);
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
- label = gtk_label_new (gpa_gpgme_key_get_short_keyid (key, 0));
+ label = gtk_label_new (gpa_gpgme_key_get_short_keyid (key));
gtk_table_attach (GTK_TABLE (table), label, 1, 2, 1, 2,
GTK_FILL|GTK_EXPAND, 0, 0, 0);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
@@ -91,11 +89,10 @@
return table;
}
-/*
- * A Frame to select an expiry date
- */
+/* A Frame to select an expiry date. */
-typedef struct {
+typedef struct
+{
GtkWidget *frame;
GtkWidget *entryAfter;
GtkWidget *comboAfter;
@@ -125,7 +122,7 @@
gtk_entry_set_text (GTK_ENTRY (frame->entryAfter), "");
gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (frame->comboAfter)->entry),
"days");
-} /* gpa_expiry_frame_dont */
+}
static void
gpa_expiry_frame_after (GtkToggleButton * radioAfter, gpointer param)
@@ -139,11 +136,11 @@
gtk_entry_set_text (GTK_ENTRY (frame->entryAfter), "1"); /*!!! */
gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (frame->comboAfter)->entry),
"days");
- } /* if */
+ }
else
gtk_entry_set_text (GTK_ENTRY (frame->entryAfter), "1");
gtk_widget_grab_focus (frame->entryAfter);
-} /* gpa_expiry_frame_after */
+}
static void
@@ -163,8 +160,8 @@
gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (frame->comboAfter)->entry),
"days");
g_free (dateBuffer);
- } /* if */
-} /* gpa_expiry_frame_at */
+ }
+}
static void
expire_date_toggled_cb (GtkToggleButton *togglebutton, gpointer user_data)
@@ -249,7 +246,7 @@
g_date_get_day (expiryDate));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (frame->radioAt),
TRUE);
- } /* if */
+ }
if (expiryDate)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radioAt), TRUE);
@@ -267,7 +264,7 @@
gtk_object_set_data_full (GTK_OBJECT (expiry_frame), "user_data",
(gpointer) frame, gpa_expiry_frame_free);
return expiry_frame;
-} /* gpa_expiry_frame_new */
+}
gboolean
@@ -312,13 +309,13 @@
result = FALSE;
}
return result;
-} /* gpa_expiry_frame_get_expiration */
+}
/* Return NULL if the values are correct and an error message if not.
- * The error message is suitable for a message box. Currently only the
- * date is validated if the "expire at" radio button is active.
- */
+ The error message is suitable for a message box. Currently only
+ the date is validated if the "expire at" radio button is
+ active. */
gchar *
gpa_expiry_frame_validate(GtkWidget * expiry_frame)
{
@@ -338,9 +335,9 @@
}
else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (frame->radioAt)))
{
- /* This case is always correct */
+ /* This case is always correct. */
result = NULL;
}
return result;
-} /* gpa_expiry_frame_validate */
+}
Modified: trunk/src/gpgmetools.c
===================================================================
--- trunk/src/gpgmetools.c 2005-10-28 15:15:56 UTC (rev 714)
+++ trunk/src/gpgmetools.c 2005-11-07 21:41:53 UTC (rev 715)
@@ -1,5 +1,5 @@
/* gpgmetools.h - additional gpgme support functions for GPA.
- Copyright (C) 2002, Miguel Coca.
+ Copyright (C) 2002 Miguel Coca.
Copyright (C) 2005 g10 Code GmbH.
This file is part of GPA.
@@ -40,8 +40,10 @@
#include <io.h>
#endif
-/* Report an unexpected error in GPGME and quit the application */
-void _gpa_gpgme_error (gpg_error_t err, const char *file, int line)
+
+/* Report an unexpected error in GPGME and quit the application. */
+void
+_gpa_gpgme_error (gpg_error_t err, const char *file, int line)
{
gchar *message = g_strdup_printf (_("Fatal Error in GPGME library\n"
"(invoked from file %s, line %i):\n\n"
@@ -53,7 +55,9 @@
exit (EXIT_FAILURE);
}
-void gpa_gpgme_warning (gpg_error_t err)
+
+void
+gpa_gpgme_warning (gpg_error_t err)
{
gchar *message = g_strdup_printf (_("The GPGME library returned an unexpected\n"
"error. The error was:\n\n"
@@ -65,8 +69,10 @@
g_free (message);
}
-/* Initialize a gpgme_ctx_t for use with GPA */
-gpgme_ctx_t gpa_gpgme_new (void)
+
+/* Initialize a gpgme_ctx_t for use with GPA. */
+gpgme_ctx_t
+gpa_gpgme_new (void)
{
gpgme_ctx_t ctx;
gpg_error_t err;
@@ -81,23 +87,25 @@
return ctx;
}
-/* Write the contents of the gpgme_data_t object to the file. Receives a
- * filehandle instead of the filename, so that the caller can make sure the
- * file is accesible before putting anything into data.
- */
-void dump_data_to_file (gpgme_data_t data, FILE *file)
+
+/* Write the contents of the gpgme_data_t object to the file.
+ Receives a filehandle instead of the filename, so that the caller
+ can make sure the file is accesible before putting anything into
+ data. */
+void
+dump_data_to_file (gpgme_data_t data, FILE *file)
{
char buffer[128];
int nread;
- gpg_error_t err;
- err = gpgme_data_rewind (data);
- if (gpg_err_code (err) != GPG_ERR_NO_ERROR)
- gpa_gpgme_error (err);
- while ( (nread = gpgme_data_read (data, buffer, sizeof(buffer))) > 0 )
+ nread = gpgme_data_seek (data, 0, SEEK_SET);
+ if (nread == -1)
{
- fwrite ( buffer, nread, 1, file );
+ gpa_window_error (strerror (errno), NULL);
+ exit (EXIT_FAILURE);
}
+ while ((nread = gpgme_data_read (data, buffer, sizeof (buffer))) > 0)
+ fwrite (buffer, nread, 1, file);
if (nread == -1)
{
gpa_window_error (strerror (errno), NULL);
@@ -106,10 +114,11 @@
return;
}
+
static gboolean
check_overwriting (const char *filename, GtkWidget *parent)
{
- /* If the file exists, ask before overwriting */
+ /* If the file exists, ask before overwriting. */
if (g_file_test (filename, G_FILE_TEST_EXISTS))
{
GtkWidget *msgbox = gtk_message_dialog_new
@@ -130,13 +139,13 @@
return TRUE;
}
-/* Not really a gpgme function, but needed in most places dump_data_to_file
- * is used.
- * Opens a file for writing, asking the user to overwrite if it exists and
- * reporting any errors. Returns NULL on failure, but you can assume the user
- * has been informed of the error (or maybe he just didn't want to
- * overwrite!) */
-FILE *gpa_fopen (const char *filename, GtkWidget *parent)
+/* Not really a gpgme function, but needed in most places
+ dump_data_to_file is used. Opens a file for writing, asking the
+ user to overwrite if it exists and reporting any errors. Returns
+ NULL on failure, but you can assume the user has been informed of
+ the error (or maybe he just didn't want to overwrite!). */
+FILE *
+gpa_fopen (const char *filename, GtkWidget *parent)
{
FILE *target;
@@ -154,6 +163,7 @@
return target;
}
+
int
gpa_open_output (const char *filename, gpgme_data_t *data, GtkWidget *parent)
{
@@ -182,6 +192,7 @@
return target;
}
+
int
gpa_open_input (const char *filename, gpgme_data_t *data, GtkWidget *parent)
{
@@ -206,11 +217,13 @@
return target;
}
-/* Do a gpgme_data_new_from_file and report any GPGME_File_Error to the user.
- */
-gpg_error_t gpa_gpgme_data_new_from_file (gpgme_data_t *data,
- const char *filename,
- GtkWidget *parent)
+
+/* Do a gpgme_data_new_from_file and report any GPGME_File_Error to
+ the user. */
+gpg_error_t
+gpa_gpgme_data_new_from_file (gpgme_data_t *data,
+ const char *filename,
+ GtkWidget *parent)
{
gpg_error_t err;
err = gpgme_data_new_from_file (data, filename, 1);
@@ -224,23 +237,25 @@
return err;
}
-/* Write the contents of the gpgme_data_t into the clipboard
- */
-void dump_data_to_clipboard (gpgme_data_t data, GtkClipboard *clipboard)
+/* Write the contents of the gpgme_data_t into the clipboard. */
+void
+dump_data_to_clipboard (gpgme_data_t data, GtkClipboard *clipboard)
{
char buffer[128];
int nread;
- gpg_error_t err;
gchar *text = NULL;
gint len = 0;
- err = gpgme_data_rewind (data);
- if (gpg_err_code (err) != GPG_ERR_NO_ERROR)
- gpa_gpgme_error (err);
- while ( (nread = gpgme_data_read (data, buffer, sizeof(buffer))) > 0 )
+ nread = gpgme_data_seek (data, 0, SEEK_SET);
+ if (nread == -1)
{
- text = g_realloc (text, len+nread);
- strncpy (text+len, buffer, nread);
+ gpa_window_error (strerror (errno), NULL);
+ exit (EXIT_FAILURE);
+ }
+ while ((nread = gpgme_data_read (data, buffer, sizeof (buffer))) > 0)
+ {
+ text = g_realloc (text, len + nread);
+ strncpy (text + len, buffer, nread);
len += nread;
}
if (nread == -1)
@@ -253,17 +268,18 @@
return;
}
-/* Assemble the parameter string for gpgme_op_genkey for GnuPG. We don't need
- * worry about the user ID being UTF-8 as long as we are using GTK+2, because
- * all user input is UTF-8 in it.
- */
-static gchar * build_genkey_parms (GPAKeyGenParameters *params)
+
+/* Assemble the parameter string for gpgme_op_genkey for GnuPG. We
+ don't need worry about the user ID being UTF-8 as long as we are
+ using GTK+2, because all user input is UTF-8 in it. */
+static gchar *
+build_genkey_parms (GPAKeyGenParameters *params)
{
gchar *string;
gchar *key_algo;
gchar *subkeys, *email, *comment, *expire;
- /* Choose which keys and subkeys to generate */
+ /* Choose which keys and subkeys to generate. */
switch (params->algo)
{
case GPA_KEYGEN_ALGO_DSA_ELGAMAL:
@@ -283,23 +299,18 @@
/* Can't happen */
return NULL;
}
- /* Build the extra fields of the user ID if supplied by the user */
+
+ /* Build the extra fields of the user ID if supplied by the user. */
if (params->email && params->email[0])
- {
- email = g_strdup_printf ("Name-Email: %s\n", params->email);
- }
+ email = g_strdup_printf ("Name-Email: %s\n", params->email);
else
- {
- email = "";
- }
+ email = "";
+
if (params->comment && params->comment[0])
- {
- comment = g_strdup_printf ("Name-Comment: %s\n", params->comment);
- }
+ comment = g_strdup_printf ("Name-Comment: %s\n", params->comment);
else
- {
- comment = "";
- }
+ comment = "";
+
/* Build the expiration date string if needed */
if (params->expiryDate)
{
@@ -309,10 +320,8 @@
g_date_get_day(params->expiryDate));
}
else if (params->interval)
- {
- expire = g_strdup_printf ("Expire-Date: %i%c\n", params->interval,
- params->unit);
- }
+ expire = g_strdup_printf ("Expire-Date: %i%c\n", params->interval,
+ params->unit);
else
expire = "";
/* Assemble the final parameter string */
@@ -331,31 +340,22 @@
/* Free auxiliary strings if they are not empty */
if (subkeys[0])
- {
- g_free (subkeys);
- }
+ g_free (subkeys);
if (email[0])
- {
- g_free (email);
- }
+ g_free (email);
if (comment[0])
- {
- g_free (comment);
- }
+ g_free (comment);
if (expire[0])
- {
- g_free (expire);
- }
+ g_free (expire);
return string;
}
-/* Begin generation of a key with the given parameters. It prepares the
- * parameters required by Gpgme and returns whatever gpgme_op_genkey_start
- * returns.
- */
-gpg_error_t gpa_generate_key_start (gpgme_ctx_t ctx,
- GPAKeyGenParameters *params)
+/* Begin generation of a key with the given parameters. It prepares
+ the parameters required by GPGME and returns whatever
+ gpgme_op_genkey_start returns. */
+gpg_error_t
+gpa_generate_key_start (gpgme_ctx_t ctx, GPAKeyGenParameters *params)
{
gchar *parm_string;
gpg_error_t err;
@@ -367,33 +367,29 @@
return err;
}
-/* Retrieve the path to the gpg executable */
-static const gchar *get_gpg_path (void)
+
+/* Retrieve the path to the GnuPG executable. */
+static const gchar *
+get_gpg_path (void)
{
- GpgmeEngineInfo engine;
- const gchar *path = NULL;
+ gpgme_engine_info_t engine;
gpgme_get_engine_info (&engine);
-
- for (;engine; engine = engine->next)
+ while (engine)
{
if (engine->protocol == GPGME_PROTOCOL_OpenPGP)
- {
- break;
- }
+ return engine->file_name;
+ engine = engine->next;
}
- if (engine)
- {
- path = engine->file_name;
- }
- return path;
+ return NULL;
}
+
/* Backup a key. It exports both the public and secret keys to a file.
- * Returns TRUE on success and FALSE on error. It displays errors to the
- * user.
- */
-gboolean gpa_backup_key (const gchar *fpr, const char *filename)
+ Returns TRUE on success and FALSE on error. It displays errors to
+ the user. */
+gboolean
+gpa_backup_key (const gchar *fpr, const char *filename)
{
gchar *header, *pub_key, *sec_key;
gchar *err;
@@ -472,6 +468,7 @@
return TRUE;
}
+
void
gpa_key_gen_free_parameters(GPAKeyGenParameters * params)
{
@@ -483,6 +480,7 @@
g_free (params);
}
+
GPAKeyGenParameters *
key_gen_params_new(void)
{
@@ -495,18 +493,21 @@
return params;
}
+
static gchar *algorithm_strings[] = {
N_("DSA and ElGamal (default)"),
N_("DSA (sign only)"),
N_("RSA (sign only)"),
};
+
const gchar *
gpa_algorithm_string (GPAKeyGenAlgo algo)
{
return _(algorithm_strings[algo]);
}
+
GPAKeyGenAlgo
gpa_algorithm_from_string (const gchar * string)
{
@@ -519,12 +520,12 @@
return result;
}
-/* Ownertrust strings */
-const gchar *gpa_key_ownertrust_string (gpgme_key_t key)
+
+/* Ownertrust strings. */
+const gchar *
+gpa_key_ownertrust_string (gpgme_key_t key)
{
- gpgme_validity_t trust;
- trust = gpgme_key_get_ulong_attr (key, GPGME_ATTR_OTRUST, NULL, 0);
- switch (trust)
+ switch (key->owner_trust)
{
case GPGME_VALIDITY_UNKNOWN:
case GPGME_VALIDITY_UNDEFINED:
@@ -546,39 +547,28 @@
}
}
-/* Key validity strings */
-const gchar *gpa_key_validity_string (gpgme_key_t key)
+
+/* Key validity strings. */
+const gchar *
+gpa_key_validity_string (gpgme_key_t key)
{
- gpgme_validity_t valid;
- valid = gpgme_key_get_ulong_attr (key, GPGME_ATTR_VALIDITY, NULL, 0);
- switch (valid)
+ switch (key->uids->validity)
{
case GPGME_VALIDITY_UNKNOWN:
case GPGME_VALIDITY_UNDEFINED:
case GPGME_VALIDITY_NEVER:
case GPGME_VALIDITY_MARGINAL:
default:
- if (gpgme_key_get_ulong_attr (key, GPGME_ATTR_KEY_REVOKED, NULL, 0))
- {
- return _("Revoked");
- }
- else if (gpgme_key_get_ulong_attr (key, GPGME_ATTR_KEY_EXPIRED, NULL, 0))
- {
- return _("Expired");
- }
- else if (gpgme_key_get_ulong_attr (key, GPGME_ATTR_KEY_DISABLED, NULL,
- 0))
- {
- return _("Disabled");
- }
- else if (gpgme_key_get_ulong_attr (key, GPGME_ATTR_UID_INVALID, NULL, 0))
- {
- return _("Incomplete");
- }
+ if (key->subkeys->revoked)
+ return _("Revoked");
+ else if (key->subkeys->expired)
+ return _("Expired");
+ else if (key->subkeys->disabled)
+ return _("Disabled");
+ else if (key->subkeys->invalid)
+ return _("Incomplete");
else
- {
- return _("Unknown");
- }
+ return _("Unknown");
break;
case GPGME_VALIDITY_FULL:
case GPGME_VALIDITY_ULTIMATE:
@@ -586,9 +576,11 @@
}
}
-static GtkWidget *passphrase_question_label (const char *uid_hint,
- const char *passphrase_info,
- int prev_was_bad)
+
+static GtkWidget *
+passphrase_question_label (const char *uid_hint,
+ const char *passphrase_info,
+ int prev_was_bad)
{
GtkWidget *label;
gchar *input;
@@ -626,10 +618,12 @@
return label;
}
-/* This is the function called by GPGME when it wants a passphrase */
-gpg_error_t gpa_passphrase_cb (void *hook, const char *uid_hint,
- const char *passphrase_info,
- int prev_was_bad, int fd)
+
+/* This is the function called by GPGME when it wants a passphrase. */
+gpg_error_t
+gpa_passphrase_cb (void *hook, const char *uid_hint,
+ const char *passphrase_info,
+ int prev_was_bad, int fd)
{
GtkWidget * dialog;
GtkWidget * hbox;
@@ -689,13 +683,12 @@
}
}
-/* Convenience functions to access key attributes, which need to be filtered
- * before being displayed to the user. */
-/* Return the user ID, making sure it is properly UTF-8 encoded.
- * Allocates a new string, which must be freed with g_free ().
- */
+/* Convenience functions to access key attributes, which need to be
+ filtered before being displayed to the user. */
+/* Return the user ID, making sure it is properly UTF-8 encoded.
+ Allocates a new string, which must be freed with g_free (). */
static gchar *
string_to_utf8 (const gchar *string)
{
@@ -705,23 +698,25 @@
{
return NULL;
}
- /* Make sure the encoding is UTF-8.
- * Test structure suggested by Werner Koch */
+ /* Make sure the encoding is UTF-8. Test structure suggested by
+ Werner Koch. */
for (s = string; *s && !(*s & 0x80); s++)
;
if (*s && !strchr (string, 0xc3))
{
- /* The string is Latin-1 */
+ /* The string is Latin-1. */
return g_convert (string, -1, "UTF-8", "ISO-8859-1", NULL, NULL, NULL);
}
else
{
- /* The string is already in UTF-8 */
+ /* The string is already in UTF-8. */
return g_strdup (string);
}
}
-gchar *gpa_gpgme_key_get_userid (gpgme_user_id_t uid)
+
+gchar *
+gpa_gpgme_key_get_userid (gpgme_user_id_t uid)
{
gchar *uid_utf8;
@@ -737,15 +732,14 @@
return uid_utf8;
}
-/* Return the key fingerprint, properly formatted according to the key version.
- * Allocates a new string, which must be freed with g_free ().
- * This is based on code from GPAPA's extract_fingerprint.
- */
-gchar *gpa_gpgme_key_get_fingerprint (gpgme_key_t key, int idx)
-{
- const char *fpraw = gpgme_key_get_string_attr (key, GPGME_ATTR_FPR,
- NULL, idx);
+/* Return the key fingerprint, properly formatted according to the key
+ version. Allocates a new string, which must be freed with
+ g_free(). This is based on code from GPAPA's
+ extract_fingerprint. */
+gchar *
+gpa_gpgme_key_format_fingerprint (const char *fpraw)
+{
if (strlen (fpraw) == 32 ) /* v3 */
{
char *fp = g_malloc (strlen (fpraw) + 16 + 1);
@@ -790,54 +784,48 @@
}
}
-/* Return the short key ID of the indicated key. The returned string is valid
- * as long as the key is valid.
- */
-const gchar *gpa_gpgme_key_get_short_keyid (gpgme_key_t key, int idx)
+
+/* Return the short key ID of the indicated key. The returned string
+ is valid as long as the key is valid. */
+const gchar *
+gpa_gpgme_key_get_short_keyid (gpgme_key_t key)
{
- const char *keyid;
- keyid = gpgme_key_get_string_attr (key, GPGME_ATTR_KEYID, NULL, idx);
+ const char *keyid = key->subkeys->keyid;
if (!keyid)
- {
- return NULL;
- }
+ return NULL;
else
- {
- return keyid+8;
- }
+ return keyid + 8;
}
-/* Convenience function to access key signature attibutes, much like the
- * previous ones */
+/* Convenience function to access key signature attibutes, much like
+ the previous ones. */
+
/* Return the user ID, making sure it is properly UTF-8 encoded.
- * Allocates a new string, which must be freed with g_free().
- */
-gchar *gpa_gpgme_key_sig_get_userid (gpgme_key_sig_t sig)
+ Allocates a new string, which must be freed with g_free(). */
+gchar *
+gpa_gpgme_key_sig_get_userid (gpgme_key_sig_t sig)
{
if (!sig->uid || !*sig->uid)
- {
- /* Duplicate it to make sure it can be g_free'd */
- return g_strdup (_("[Unknown user ID]"));
- }
+ /* Duplicate it to make sure it can be g_free'd. */
+ return g_strdup (_("[Unknown user ID]"));
else
- {
- return string_to_utf8 (sig->uid);
- }
+ return string_to_utf8 (sig->uid);
}
-/* Return the short key ID of the indicated key. The returned string is valid
- * as long as the key is valid.
- */
-const gchar *gpa_gpgme_key_sig_get_short_keyid (gpgme_key_sig_t sig)
+
+/* Return the short key ID of the indicated key. The returned string
+ is valid as long as the key is valid. */
+const gchar *
+gpa_gpgme_key_sig_get_short_keyid (gpgme_key_sig_t sig)
{
- return sig->keyid+8;
+ return sig->keyid + 8;
}
-/* Return a string with the status of the key signature.
- */
-const gchar *gpa_gpgme_key_sig_get_sig_status (gpgme_key_sig_t sig,
- GHashTable *revoked)
+/* Return a string with the status of the key signature. */
+const gchar *
+gpa_gpgme_key_sig_get_sig_status (gpgme_key_sig_t sig,
+ GHashTable *revoked)
{
const gchar *status;
switch (sig->status)
@@ -861,11 +849,12 @@
return status;
}
-/* Return a string with the level of the key signature.
- */
-const gchar *gpa_gpgme_key_sig_get_level (gpgme_key_sig_t sig)
+
+/* Return a string with the level of the key signature. */
+const gchar *
+gpa_gpgme_key_sig_get_level (gpgme_key_sig_t sig)
{
- switch (sig->class)
+ switch (sig->sig_class)
{
case 0x10:
return _("Generic");
@@ -885,36 +874,29 @@
}
}
-/* Return a string listing the capabilities of a key.
- */
-const gchar *gpa_get_key_capabilities_text (gpgme_key_t key)
+
+/* Return a string listing the capabilities of a key. */
+const gchar *
+gpa_get_key_capabilities_text (gpgme_key_t key)
{
if (key->can_certify)
{
if (key->can_sign)
{
if (key->can_encrypt)
- {
- return _("The key can be used for certification, signing "
- "and encryption.");
- }
+ return _("The key can be used for certification, signing "
+ "and encryption.");
else
- {
- return _("The key can be used for certification and "
- "signing, but not for encryption.");
- }
+ return _("The key can be used for certification and "
+ "signing, but not for encryption.");
}
else
{
if (key->can_encrypt)
- {
- return _("The key can be used for certification and "
- "encryption.");
- }
+ return _("The key can be used for certification and "
+ "encryption.");
else
- {
- return _("The key can be used only for certification.");
- }
+ return _("The key can be used only for certification.");
}
}
else
@@ -922,27 +904,18 @@
if (key->can_sign)
{
if (key->can_encrypt)
- {
- return _("The key can be used only for signing and "
- "encryption, but not for certification.");
- }
+ return _("The key can be used only for signing and "
+ "encryption, but not for certification.");
else
- {
- return _("The key can be used only for signing.");
- }
+ return _("The key can be used only for signing.");
}
else
{
if (key->can_encrypt)
- {
- return _("The key can be used only for encryption.");
-
- }
+ return _("The key can be used only for encryption.");
else
- {
- /* Can't happen, even for subkeys */
+ /* Can't happen, even for subkeys. */
return _("This key is useless.");
- }
}
}
}
Modified: trunk/src/gpgmetools.h
===================================================================
--- trunk/src/gpgmetools.h 2005-10-28 15:15:56 UTC (rev 714)
+++ trunk/src/gpgmetools.h 2005-11-07 21:41:53 UTC (rev 715)
@@ -19,7 +19,7 @@
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */
-/* A set of auxiliary functions for common tasks related to GPGME */
+/* A set of auxiliary functions for common tasks related to GPGME. */
#ifndef GPGMETOOLS_H
#define GPGMETOOLS_H
@@ -37,88 +37,86 @@
#define GPA_KEYGEN_ALGO_FIRST GPA_KEYGEN_ALGO_DSA_ELGAMAL
#define GPA_KEYGEN_ALGO_LAST GPA_KEYGEN_ALGO_RSA
-typedef struct {
- /* user id */
- gchar *userID, *email, *comment;
+typedef struct
+ {
+ /* User ID. */
+ gchar *userID;
+ gchar *email;
+ gchar *comment;
- /* algorithm */
+ /* Algorithm. */
GPAKeyGenAlgo algo;
- /* key size. */
+ /* Key size. */
gint keysize;
- /* the password to use */
- gchar * password;
+ /* The password to use. */
+ gchar *password;
- /* the expiry date. if expiryDate is not NULL it holds the expiry
- * date, otherwise if interval is not zero, it defines the period of
- * time until expiration together with unit (which is one of d, w, m,
- * y), otherwise the user chose "never expire".
- */
+ /* The expiry date. If expiryDate is not NULL it holds the expiry
+ date, otherwise if interval is not zero, it defines the period of
+ time until expiration together with unit (which is one of d, w,
+ m, y), otherwise the user chose "never expire". */
GDate *expiryDate;
gint interval;
gchar unit;
} GPAKeyGenParameters;
/* Report an unexpected error in GPGME and quit the application.
- * Better to use the macro instead of the function
- */
+ Better to use the macro instead of the function. */
#define gpa_gpgme_error(err) _gpa_gpgme_error (err, __FILE__, __LINE__);
void _gpa_gpgme_error (gpg_error_t err, const char *file, int line);
-/* The same, without quitting */
+
+/* The same as gpa_gpgme_error, without quitting. */
void gpa_gpgme_warning (gpg_error_t err);
-/* Initialize a gpgme_ctx_t for use with GPA */
+/* Initialize a gpgme_ctx_t for use with GPA. */
gpgme_ctx_t gpa_gpgme_new (void);
-/* Write the contents of the gpgme_data_t object to the file. Receives a
- * filehandle instead of the filename, so that the caller can make sure the
- * file is accesible before putting anything into data.
- */
+/* Write the contents of the gpgme_data_t object to the file. Receives
+ a filehandle instead of the filename, so that the caller can make
+ sure the file is accesible before putting anything into data. */
void dump_data_to_file (gpgme_data_t data, FILE *file);
-/* Not really a gpgme function, but needed in most places dump_data_to_file
- * is used.
- * Opens a file for writing, asking the user to overwrite if it exists and
- * reporting any errors. Returns NULL on failure, but you can assume the user
- * has been informed of the error (or maybe he just didn't want to
- * overwrite!) */
+/* Not really a gpgme function, but needed in most places
+ dump_data_to_file is used. Opens a file for writing, asking the
+ user to overwrite if it exists and reporting any errors. Returns
+ NULL on failure, but you can assume the user has been informed of
+ the error (or maybe he just didn't want to overwrite!). */
FILE *gpa_fopen (const char *filename, GtkWidget *parent);
-/* Do a gpgme_data_new_from_file and report any GPGME_File_Error to the user.
- */
+/* Do a gpgme_data_new_from_file and report any GPG_ERR_File_Error to
+ the user. */
gpg_error_t gpa_gpgme_data_new_from_file (gpgme_data_t *data,
const char *filename,
GtkWidget *parent);
-/* Create a new gpgme_data_t from a file for writing, and return the file
- * descriptor for the file. Always reports all errors to the user.
- */
-int gpa_open_output (const char *filename, gpgme_data_t *data, GtkWidget *parent);
+/* Create a new gpgme_data_t from a file for writing, and return the
+ file descriptor for the file. Always reports all errors to the
+ user. */
+int gpa_open_output (const char *filename, gpgme_data_t *data,
+ GtkWidget *parent);
-/* Create a new gpgme_data_t from a file for reading, and return the file
- * descriptor for the file. Always reports all errors to the user.
- */
-int gpa_open_input (const char *filename, gpgme_data_t *data, GtkWidget *parent);
+/* Create a new gpgme_data_t from a file for reading, and return the
+ file descriptor for the file. Always reports all errors to the user. */
+int gpa_open_input (const char *filename, gpgme_data_t *data,
+ GtkWidget *parent);
-/* Write the contents of the gpgme_data_t into the clipboard
- */
+/* Write the contents of the gpgme_data_t into the clipboard. */
void dump_data_to_clipboard (gpgme_data_t data, GtkClipboard *clipboard);
-/* Begin generation of a key with the given parameters. It prepares the
- * parameters required by Gpgme and returns whatever gpgme_op_genkey_start
- * returns.
- */
+/* Begin generation of a key with the given parameters. It prepares
+ the parameters required by Gpgme and returns whatever
+ gpgme_op_genkey_start returns. */
gpg_error_t gpa_generate_key_start (gpgme_ctx_t ctx,
GPAKeyGenParameters *params);
-/* Backup a key. It exports both the public and secret keys to a file.
- * Returns TRUE on success and FALSE on error. It displays errors to the
- * user.
- */
+/* Backup a key. It exports both the public and secret keys to a
+ file. Returns TRUE on success and FALSE on error. It displays
+ errors to the user. */
gboolean gpa_backup_key (const gchar *fpr, const char *filename);
-GPAKeyGenParameters * key_gen_params_new (void);
+GPAKeyGenParameters *key_gen_params_new (void);
void gpa_key_gen_free_parameters (GPAKeyGenParameters *params);
@@ -126,13 +124,14 @@
GPAKeyGenAlgo gpa_algorithm_from_string (const gchar * string);
-/* Ownertrust strings */
+/* Ownertrust strings. */
const gchar *gpa_key_ownertrust_string (gpgme_key_t key);
-/* Key validity strings */
+/* Key validity strings. */
const gchar *gpa_key_validity_string (gpgme_key_t key);
-/* This is the function called by GPGME when it wants a passphrase */
+/* This is the function called by GPGME when it wants a
+ passphrase. */
gpg_error_t gpa_passphrase_cb (void *hook, const char *uid_hint,
const char *passphrase_info,
int prev_was_bad, int fd);
@@ -142,45 +141,38 @@
filtered before being displayed to the user. */
/* Return the user ID string, making sure it is properly UTF-8
- encoded. Allocates a new string, which must be freed with
- g_free(). */
+ encoded. Allocates a new string, which must be freed with
+ g_free(). */
gchar *gpa_gpgme_key_get_userid (gpgme_user_id_t key);
-/* Return the key fingerprint, properly formatted according to the key version.
- * Allocates a new string, which must be freed with g_free().
- * This is based on code from GPAPA's extract_fingerprint.
- */
-gchar *gpa_gpgme_key_get_fingerprint (gpgme_key_t key, int idx);
+/* Return the key fingerprint, properly formatted according to the key
+ version. Allocates a new string, which must be freed with
+ g_free(). This is based on code from GPAPA's extract_fingerprint. */
+gchar *gpa_gpgme_key_format_fingerprint (const char *fpraw);
-/* Return the short key ID of the indicated key. The returned string is valid
- * as long as the key is valid.
- */
-const gchar *gpa_gpgme_key_get_short_keyid (gpgme_key_t key, int idx);
+/* Return the short key ID of the indicated key. The returned string
+ is valid as long as the key is valid. */
+const gchar *gpa_gpgme_key_get_short_keyid (gpgme_key_t key);
-/* Convenience function to access key signature attibutes, much like the
- * previous ones */
+/* Convenience function to access key signature attibutes, much like
+ the previous ones. */
/* Return the user ID, making sure it is properly UTF-8 encoded.
- * Allocates a new string, which must be freed with g_free().
- */
+ Allocates a new string, which must be freed with g_free(). */
gchar *gpa_gpgme_key_sig_get_userid (gpgme_key_sig_t sig);
-/* Return the short key ID of the indicated key. The returned string is valid
- * as long as the key is valid.
- */
+/* Return the short key ID of the indicated key. The returned string
+ is valid as long as the key is valid. */
const gchar *gpa_gpgme_key_sig_get_short_keyid (gpgme_key_sig_t sig);
-/* Return a string with the status of the key signature.
- */
+/* Return a string with the status of the key signature. */
const gchar *gpa_gpgme_key_sig_get_sig_status (gpgme_key_sig_t sig,
GHashTable *revoked);
-/* Return a string with the level of the key signature.
- */
+/* Return a string with the level of the key signature. */
const gchar *gpa_gpgme_key_sig_get_level (gpgme_key_sig_t sig);
-/* Return a string listing the capabilities of a key.
- */
+/* Return a string listing the capabilities of a key. */
const gchar *gpa_get_key_capabilities_text (gpgme_key_t key);
#endif
Modified: trunk/src/keylist.c
===================================================================
--- trunk/src/keylist.c 2005-10-28 15:15:56 UTC (rev 714)
+++ trunk/src/keylist.c 2005-11-07 21:41:53 UTC (rev 715)
@@ -545,7 +545,7 @@
list->keys = g_list_append (list->keys, key);
store = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (list)));
/* Get the column values */
- keyid = gpa_gpgme_key_get_short_keyid (key, 0);
+ keyid = gpa_gpgme_key_get_short_keyid (key);
expiry = gpa_expiry_date_string (key->subkeys->expires);
ownertrust = gpa_key_ownertrust_string (key);
validity = gpa_key_validity_string (key);
Modified: trunk/src/keyring.c
===================================================================
--- trunk/src/keyring.c 2005-10-28 15:15:56 UTC (rev 714)
+++ trunk/src/keyring.c 2005-11-07 21:41:53 UTC (rev 715)
@@ -1252,10 +1252,10 @@
gtk_label_set_text (GTK_LABEL (editor->detail_name), text);
g_free (text);
- text = (gchar*) gpa_gpgme_key_get_short_keyid (key, 0);
+ text = (gchar*) gpa_gpgme_key_get_short_keyid (key);
gtk_label_set_text (GTK_LABEL (editor->detail_key_id), text);
- text = gpa_gpgme_key_get_fingerprint (key, 0);
+ text = gpa_gpgme_key_format_fingerprint (key->subkeys->fpr);
gtk_label_set_text (GTK_LABEL (editor->detail_fingerprint), text);
g_free (text);
text = gpa_expiry_date_string (key->subkeys->expires);
@@ -1681,7 +1681,7 @@
gtk_label_set_text (GTK_LABEL (editor->status_key_user), string);
g_free (string);
gtk_label_set_text (GTK_LABEL (editor->status_key_id),
- gpa_gpgme_key_get_short_keyid (key, 0));
+ gpa_gpgme_key_get_short_keyid (key));
}
else
{
Modified: trunk/src/keysigndlg.c
===================================================================
--- trunk/src/keysigndlg.c 2005-10-28 15:15:56 UTC (rev 714)
+++ trunk/src/keysigndlg.c 2005-11-07 21:41:53 UTC (rev 715)
@@ -119,7 +119,7 @@
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, 0, 0, 0);
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
- string = gpa_gpgme_key_get_fingerprint (key, 0);
+ string = gpa_gpgme_key_format_fingerprint (key->subkeys->fpr);
label = gtk_label_new (string);
g_free (string);
gtk_table_attach (GTK_TABLE (table), label, 1, 2, 1, 2, GTK_FILL, 0, 0, 0);
Modified: trunk/src/verifydlg.c
===================================================================
--- trunk/src/verifydlg.c 2005-10-28 15:15:56 UTC (rev 714)
+++ trunk/src/verifydlg.c 2005-11-07 21:41:53 UTC (rev 715)
@@ -259,7 +259,7 @@
if (data->key)
{
- keyid = gpa_gpgme_key_get_short_keyid (data->key, 0);
+ keyid = gpa_gpgme_key_get_short_keyid (data->key);
userid = gpa_gpgme_key_get_userid (data->key->uids);
status = signature_status_label (data);
}
More information about the Gpa-commits
mailing list