]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
When finding private keys fail, return error code.
authorStef Walter <stefw@collabora.co.uk>
Mon, 1 Aug 2011 09:11:01 +0000 (11:11 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 1 Aug 2011 15:56:48 +0000 (17:56 +0200)
 * Previously this would result in an endless loop.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
lib/pkcs11_privkey.c

index e1eea0fd02c79318ad4131925fcacc524c288d2e..8d1fe303f12f10569847a6a7d2baea6227be70ad 100644 (file)
@@ -137,8 +137,10 @@ gnutls_pkcs11_privkey_get_info (gnutls_pkcs11_privkey_t pkey,
                           } \
                        gnutls_assert(); \
                        return ret; \
-               } \
-       } while (ret < 0);
+               } else if (ret < 0) { \
+                        return ret; \
+                } \
+       } while (0);
 
 /*-
  * _gnutls_pkcs11_privkey_sign_hash: