>From d5c239f7542916b4fd50386476256c89d8cef58b Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Mon, 1 Aug 2011 11:11:01 +0200 Subject: [PATCH 2/3] When finding private keys fail, return error code. * Previously this would result in an endless loop. --- lib/pkcs11_privkey.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/pkcs11_privkey.c b/lib/pkcs11_privkey.c index e1eea0f..8d1fe30 100644 --- a/lib/pkcs11_privkey.c +++ b/lib/pkcs11_privkey.c @@ -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: -- 1.7.6