[Gpa-commits] r882 - trunk/src

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri May 2 22:19:04 CEST 2008


Author: marcus
Date: 2008-05-02 22:19:04 +0200 (Fri, 02 May 2008)
New Revision: 882

Modified:
   trunk/src/ChangeLog
   trunk/src/gpastreamsignop.c
Log:
2008-05-02  Marcus Brinkmann  <marcus at g10code.de>

	* gpastreamsignop.c (done_cb): Print MICALG status message for
	each signature.


Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog	2008-05-02 17:14:37 UTC (rev 881)
+++ trunk/src/ChangeLog	2008-05-02 20:19:04 UTC (rev 882)
@@ -1,3 +1,8 @@
+2008-05-02  Marcus Brinkmann  <marcus at g10code.de>
+
+	* gpastreamsignop.c (done_cb): Print MICALG status message for
+	each signature.
+
 2008-05-02  Werner Koch  <wk at g10code.com>
 
 	* gpa.c (option_entries): Add option --settings.

Modified: trunk/src/gpastreamsignop.c
===================================================================
--- trunk/src/gpastreamsignop.c	2008-05-02 17:14:37 UTC (rev 881)
+++ trunk/src/gpastreamsignop.c	2008-05-02 20:19:04 UTC (rev 882)
@@ -421,6 +421,39 @@
 {
   gtk_widget_hide (GPA_STREAM_OPERATION (op)->progress_dialog);
 
+  if (! err)
+    {
+      gpgme_protocol_t protocol;
+      gpgme_sign_result_t res;
+      gpgme_new_signature_t sig;
+
+      protocol = gpgme_get_protocol (GPA_OPERATION (op)->context->ctx);
+
+      res = gpgme_op_sign_result (GPA_OPERATION (op)->context->ctx);
+      if (res)
+	{
+	  sig = res->signatures;
+	  while (sig)
+	    {
+	      char *str;
+	      char *algo_name;
+	      
+	      str = g_strdup_printf
+		("%s%s", (protocol == GPGME_PROTOCOL_OpenPGP) ? "pgp-" : "",
+		 gpgme_hash_algo_name (sig->hash_algo));
+	      algo_name = g_ascii_strdown (str, -1);
+	      g_free (str);
+
+	      /* FIXME: Error handling.  */
+	      err = gpa_operation_write_status (GPA_OPERATION (op), "MICALG",
+						algo_name, NULL);
+
+	      g_free (algo_name);
+	      sig = sig->next;
+	    }
+	}
+    }
+
   g_signal_emit_by_name (GPA_OPERATION (op), "completed", err);
 }
 



More information about the Gpa-commits mailing list