diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2009-07-15 22:01:47 +0300 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2009-07-15 22:01:47 +0300 |
commit | c832d7f4546cd0217d0a9be2fd13ebaca886f704 (patch) | |
tree | a8c1c2dee99dd3f6f0cf8133939f99d135100de2 /src | |
parent | 39b8135436431c12ab76024bf3dfba338e25e0ec (diff) | |
download | gnutls-c832d7f4546cd0217d0a9be2fd13ebaca886f704.tar.gz |
Several bug fixes by Fabian Keil (some were modified by me).
Diffstat (limited to 'src')
-rw-r--r-- | src/certtool.c | 5 | ||||
-rw-r--r-- | src/psk.c | 5 |
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; @@ -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 { |