From a24fe59ee46316b3fd7de937f2845dfe7ae530c1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 17 Feb 2009 12:18:34 +0000 Subject: [PATCH] - Kamil Dudka made NSS-powered builds compile and run again! --- CHANGES | 2 ++ RELEASE-NOTES | 4 +++- lib/nss.c | 5 +++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 91d7c2f71..f2c521ef0 100644 --- a/CHANGES +++ b/CHANGES @@ -7,6 +7,8 @@ Changelog Daniel Stenberg (17 Feb 2009) +- Kamil Dudka made NSS-powered builds compile and run again! + - A second follow-up change by Andre Guibert de Bruet to fix a related memory leak like that fixed on the 14th. When zlib returns failure, we need to cleanup properly before returning error. diff --git a/RELEASE-NOTES b/RELEASE-NOTES index ebd3c3a42..f9d6ca3db 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -34,6 +34,7 @@ This release includes the following bugfixes: o CURLINFO_CONTENT_LENGTH_DOWNLOAD size from file:// "transfers" with CURLOPT_NOBODY set true o memory leak on some libz errors for content encodings + o NSS-enabled build is repaired This release includes the following known bugs: @@ -44,6 +45,7 @@ advice from friends like these: Lisa Xu, Daniel Fandrich, Craig A West, Alexey Borzov, Sharad Gupta, Peter Sylvester, Chad Monroe, Markus Moeller, Yang Tse, Scott Cantor, - Patrick Scott, Hidemoto Nakada, Jocelyn Jaubert, Andre Guibert de Bruet + Patrick Scott, Hidemoto Nakada, Jocelyn Jaubert, Andre Guibert de Bruet, + Kamil Dudka Thanks! (and sorry if I forgot to mention someone) diff --git a/lib/nss.c b/lib/nss.c index 98ed31149..83ad6ebbc 100644 --- a/lib/nss.c +++ b/lib/nss.c @@ -1140,7 +1140,7 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex) n = strrchr(data->set.str[STRING_CERT], '/'); if(n) { n++; /* skip last slash */ - nickname = aprintf(nickname, "PEM Token #%d:%s", 1, n); + nickname = aprintf("PEM Token #%d:%s", 1, n); if(!nickname) return CURLE_OUT_OF_MEMORY; @@ -1171,7 +1171,8 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex) if(SSL_GetClientAuthDataHook(model, (SSLGetClientAuthData) SelectClientCert, - (void *)connssl) != SECSuccess) { + (void *)connssl->client_nickname) != + SECSuccess) { curlerr = CURLE_SSL_CERTPROBLEM; goto error; }