summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2009-07-15 22:01:47 +0300
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2009-07-15 22:01:47 +0300
commitc832d7f4546cd0217d0a9be2fd13ebaca886f704 (patch)
treea8c1c2dee99dd3f6f0cf8133939f99d135100de2 /src
parent39b8135436431c12ab76024bf3dfba338e25e0ec (diff)
downloadgnutls-c832d7f4546cd0217d0a9be2fd13ebaca886f704.tar.gz
Several bug fixes by Fabian Keil (some were modified by me).
Diffstat (limited to 'src')
-rw-r--r--src/certtool.c5
-rw-r--r--src/psk.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/src/certtool.c b/src/certtool.c
index f7342dd955..882cb99b12 100644
--- a/src/certtool.c
+++ b/src/certtool.c
@@ -1985,9 +1985,8 @@ static void print_verification_res (gnutls_x509_crt_t crt,
static int
_verify_x509_mem (const void *cert, int cert_size)
{
- int siz, i;
const char *ptr;
- int ret;
+ int ret, i;
char name[256];
char issuer_name[256];
size_t name_size;
@@ -2003,7 +2002,6 @@ _verify_x509_mem (const void *cert, int cert_size)
/* Decode the CRL list
*/
- siz = cert_size;
ptr = cert;
i = 1;
@@ -2047,7 +2045,6 @@ _verify_x509_mem (const void *cert, int cert_size)
/* Decode the certificate chain.
*/
- siz = cert_size;
ptr = cert;
i = 1;
diff --git a/src/psk.c b/src/psk.c
index b0047e08ee..7de5ea5e21 100644
--- a/src/psk.c
+++ b/src/psk.c
@@ -138,6 +138,11 @@ main (int argc, char **argv)
ret = gnutls_psk_netconf_derive_key (passwd,
info.username,
info.netconf_hint, &dkey);
+ if (ret < 0)
+ {
+ fprintf (stderr, "Deriving the key failed\n");
+ exit (1);
+ }
}
else
{