Use gpgme interface for error handling to avoid linking with gpg-error.
[gpgme.git] / tests / gpgsm / cms-keylist.c
index cf1788819900a0adcaf3047a306565b9555aeea4..7ed3a4e826981323b8285167bb81a0b7abd3a743 100644 (file)
@@ -63,6 +63,9 @@ main (int argc, char **argv)
   fail_if_err (err);
   gpgme_set_protocol (ctx, GPGME_PROTOCOL_CMS);
 
+  gpgme_set_keylist_mode (ctx, (gpgme_get_keylist_mode (ctx)
+                                | GPGME_KEYLIST_MODE_VALIDATE));
+
   err = gpgme_op_keylist_start (ctx, argc? argv[0]:NULL, 0);
   fail_if_err (err);
     
@@ -105,7 +108,7 @@ main (int argc, char **argv)
 
       gpgme_key_unref (key);
     }
-  if (gpg_err_code (err) != GPG_ERR_EOF)
+  if (gpgme_err_code (err) != GPG_ERR_EOF)
     fail_if_err (err);
   err = gpgme_op_keylist_end (ctx);
   fail_if_err (err);