]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
some updates
authorNikos <nmav@crystal.(none)>
Sun, 27 Jan 2008 07:09:02 +0000 (09:09 +0200)
committerNikos <nmav@crystal.(none)>
Sun, 27 Jan 2008 07:09:02 +0000 (09:09 +0200)
src/certtool.c

index db15cccfaf6c72e6d0666c96ddb25d00628e76ff..f2d58b93c86a27fad05d1badd6e435c24c1b7f02 100644 (file)
@@ -1238,6 +1238,11 @@ pgp_ring_info (void)
   for (i = 0; i < count; i++)
     {
       ret = gnutls_openpgp_keyring_get_crt (ring, i, &crt);
+      
+      if (ret < 0)
+        {
+         error (EXIT_FAILURE, 0, "Export error: %s", gnutls_strerror (ret));
+        }
 
       size = sizeof (buffer);
       ret =
@@ -1245,12 +1250,11 @@ pgp_ring_info (void)
                                     &size);
       if (ret < 0)
        {
-         error (EXIT_FAILURE, 0, "Export error: %s",
-                gnutls_strerror (ret));
-         fwrite (buffer, 1, size, outfile);
+         error (EXIT_FAILURE, 0, "Export error: %s", gnutls_strerror (ret));
        }
 
-      fprintf (outfile, "%s\n\n", buffer);
+      fwrite (buffer, 1, size, outfile);
+      fprintf (outfile, "\n\n", buffer);
 
       gnutls_openpgp_crt_deinit (crt);