certChain            = ss->ssl3->clientCertChain;
certChain          = ss->ssl3->clientCertChain; ss->sec->localCert = CERT_DupCertificate(ss->ssl3->clientCertificate);
ssl3_SendCertificate(sslSocket *ss){    SECStatus            rv;    CERTCertificateList *certChain;    int                  len 		= 0;    int                  i;    SSL_TRC(3, ("%d: SSL3[%d]: send certificate handshake",		SSL_GETPID(), ss->fd));    PORT_Assert( ssl_HaveXmitBufLock(ss));    PORT_Assert( ssl_HaveSSL3HandshakeLock(ss));    if (ss->sec->isServer) {	sslServerCerts * sc = 			ss->serverCerts + ss->ssl3->hs.kea_def->exchKeyType;	certChain              = sc->serverCertChain;	ss->sec->authKeyBits   = sc->serverKeyBits;	ss->sec->authAlgorithm = ss->ssl3->hs.kea_def->signKeyType;    } else {	certChain            = ss->ssl3->clientCertChain;    }    if (certChain) {	for (i = 0; i < certChain->len; i++) {	    len += certChain->certs[i].len + 3;	}    }    rv = ssl3_AppendHandshakeHeader(ss, certificate, len + 3);    if (rv != SECSuccess) {	return rv; 		/* err set by AppendHandshake. */    }    rv = ssl3_AppendHandshakeNumber(ss, len, 3);    if (rv != SECSuccess) {	return rv; 		/* err set by AppendHandshake. */    }    for (i = 0; i < certChain->len; i++) {	rv = ssl3_AppendHandshakeVariable(ss, certChain->certs[i].data,					  certChain->certs[i].len, 3);	if (rv != SECSuccess) {	    return rv; 		/* err set by AppendHandshake. */	}    }    return SECSuccess;}