From e393d91fcbd1ae3ce95a5799b168e4de1fd8ac7c Mon Sep 17 00:00:00 2001 From: "alexei.volkov.bugs%sun.com" Date: Wed, 15 Feb 2006 22:22:32 +0000 Subject: [PATCH] [Bug 326963] Interoperability test with apache/mod_ssl: tstclnt produces: assertion failure: secmod_PrivateModuleCount == 0; r=nelson, sr=julie n --- security/nss/lib/ssl/ssl3con.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/security/nss/lib/ssl/ssl3con.c b/security/nss/lib/ssl/ssl3con.c index b0a23dae559e..6adae1775951 100644 --- a/security/nss/lib/ssl/ssl3con.c +++ b/security/nss/lib/ssl/ssl3con.c @@ -39,7 +39,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -/* $Id: ssl3con.c,v 1.77 2005/12/14 01:49:39 wtchang%redhat.com Exp $ */ +/* $Id: ssl3con.c,v 1.78 2006/02/15 22:22:32 alexei.volkov.bugs%sun.com Exp $ */ #include "nssrenam.h" #include "cert.h" @@ -4598,6 +4598,14 @@ ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length) CERT_DestroyCertificateList(ss->ssl3.clientCertChain); ss->ssl3.clientCertChain = NULL; } + if (ss->ssl3.clientCertificate != NULL) { + CERT_DestroyCertificate(ss->ssl3.clientCertificate); + ss->ssl3.clientCertificate = NULL; + } + if (ss->ssl3.clientPrivateKey != NULL) { + SECKEY_DestroyPrivateKey(ss->ssl3.clientPrivateKey); + ss->ssl3.clientPrivateKey = NULL; + } isTLS = (PRBool)(ss->ssl3.prSpec->version > SSL_LIBRARY_VERSION_3_0); rv = ssl3_ConsumeHandshakeVariable(ss, &cert_types, 1, &b, &length);