From: Nikos Date: Sun, 27 Jan 2008 07:09:02 +0000 (+0200) Subject: some updates X-Git-Tag: gnutls_2_3_1~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84dbba089ff08548f3c7a26bf2590fa160d1ada8;p=thirdparty%2Fgnutls.git some updates --- diff --git a/src/certtool.c b/src/certtool.c index db15cccfaf..f2d58b93c8 100644 --- a/src/certtool.c +++ b/src/certtool.c @@ -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);