[svn] gpgme - r1389 - trunk/src

svn author wk cvs at cvs.gnupg.org
Tue Jul 7 14:38:18 CEST 2009


Author: wk
Date: 2009-07-07 14:38:18 +0200 (Tue, 07 Jul 2009)
New Revision: 1389

Modified:
   trunk/src/ChangeLog
   trunk/src/engine-gpgsm.c
Log:
* engine-gpgsm.c (gpgsm_import): Return an error for unknown data

encodings.


Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog	2009-06-22 14:50:17 UTC (rev 1388)
+++ trunk/src/ChangeLog	2009-07-07 12:38:18 UTC (rev 1389)
@@ -1,3 +1,8 @@
+2009-07-07  Werner Koch  <wk at g10code.com>
+
+	* engine-gpgsm.c (gpgsm_import): Return an error for unknown data
+	encodings.
+
 2009-06-22  Marcus Brinkmann  <marcus at g10code.de>
 
 	* debug.h: Everywhere, use %p instead of 0x%x to print pointer.

Modified: trunk/src/engine-gpgsm.c
===================================================================
--- trunk/src/engine-gpgsm.c	2009-06-22 14:50:17 UTC (rev 1388)
+++ trunk/src/engine-gpgsm.c	2009-07-07 12:38:18 UTC (rev 1389)
@@ -1544,6 +1544,7 @@
 {
   engine_gpgsm_t gpgsm = engine;
   gpgme_error_t err;
+  gpgme_data_encoding_t dataenc;
 
   if (!gpgsm)
     return gpg_error (GPG_ERR_INV_VALUE);
@@ -1551,10 +1552,18 @@
   if (keydata && keyarray)
     gpg_error (GPG_ERR_INV_VALUE); /* Only one is allowed.  */
 
+  dataenc = gpgme_data_get_encoding (keydata);
+
   if (keyarray)
     {
       return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
     }
+  else if (dataenc == GPGME_DATA_ENCODING_URL
+           || dataenc == GPGME_DATA_ENCODING_URL0
+           || dataenc == GPGME_DATA_ENCODING_URLESC)
+    {
+      return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
+    }
   else
     {
       gpgsm->input_cb.data = keydata;




More information about the Gnupg-commits mailing list