Blame SOURCES/nss-3.79-fix-client-cert-crash.patch

87e872
diff --git a/lib/ssl/authcert.c b/lib/ssl/authcert.c
87e872
--- a/lib/ssl/authcert.c
87e872
+++ b/lib/ssl/authcert.c
87e872
@@ -201,16 +201,19 @@ NSS_GetClientAuthData(void *arg,
87e872
 
87e872
     /* otherwise look through the cache based on usage
87e872
      * if chosenNickname is set, we ignore the expiration date */
87e872
     if (certList == NULL) {
87e872
         certList = CERT_FindUserCertsByUsage(CERT_GetDefaultCertDB(),
87e872
                                              certUsageSSLClient,
87e872
                                              PR_FALSE, chosenNickName == NULL,
87e872
                                              pw_arg);
87e872
+        if (certList == NULL) {
87e872
+            return SECFailure;
87e872
+        }
87e872
         /* filter only the certs that meet the nickname requirements */
87e872
         if (chosenNickName) {
87e872
             rv = CERT_FilterCertListByNickname(certList, chosenNickName,
87e872
                                                pw_arg);
87e872
         } else {
87e872
             int nnames = 0;
87e872
             char **names = ssl_DistNamesToStrings(caNames, &nnames);
87e872
             rv = CERT_FilterCertListByCANames(certList, nnames, names,