From e1c95dc9e40dd67727331b8f6d35c750e575aaf0 Mon Sep 17 00:00:00 2001 From: "wtchang%redhat.com" Date: Fri, 3 Mar 2006 18:48:09 +0000 Subject: [PATCH] Bugzilla bug 326482: code cleanup: ssl3_NewKeyPair should not create a key pair with only one key. r=nelson.bolyard. --- security/nss/lib/ssl/ssl3con.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/security/nss/lib/ssl/ssl3con.c b/security/nss/lib/ssl/ssl3con.c index 107535b8ebd..c8ed3c5b853 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.81 2006-03-02 00:07:08 wtchang%redhat.com Exp $ */ +/* $Id: ssl3con.c,v 1.82 2006-03-03 18:48:09 wtchang%redhat.com Exp $ */ #include "nssrenam.h" #include "cert.h" @@ -7800,8 +7800,7 @@ ssl3_NewKeyPair( SECKEYPrivateKey * privKey, SECKEYPublicKey * pubKey) { ssl3KeyPair * pair; - if (!privKey && !pubKey) { - /* one or the other may be NULL, but not both. */ + if (!privKey || !pubKey) { PORT_SetError(PR_INVALID_ARGUMENT_ERROR); return NULL; }