if ((c == NULL) || (c->valid)) return;
if (c == NULL) return;
void ssl_set_cert_masks(CERT *c,SSL_CIPHER *cipher)	{	CERT_PKEY *cpk;	int rsa_enc,rsa_tmp,rsa_sign,dh_tmp,dh_rsa,dh_dsa,dsa_sign;	int rsa_enc_export,dh_rsa_export,dh_dsa_export;	int rsa_tmp_export,dh_tmp_export,kl;	unsigned long mask,emask;	if ((c == NULL) || (c->valid)) return;	kl=SSL_C_EXPORT_PKEYLENGTH(cipher);#ifndef NO_RSA	rsa_tmp=(c->rsa_tmp != NULL || c->rsa_tmp_cb != NULL);	rsa_tmp_export=(c->rsa_tmp_cb != NULL ||		(rsa_tmp && RSA_size(c->rsa_tmp)*8 <= kl));#else	rsa_tmp=rsa_tmp_export=0;#endif#ifndef NO_DH	dh_tmp=(c->dh_tmp != NULL || c->dh_tmp_cb != NULL);	dh_tmp_export=(c->dh_tmp_cb != NULL ||		(dh_tmp && DH_size(c->dh_tmp)*8 <= kl));#else	dh_tmp=dh_tmp_export=0;#endif	cpk= &(c->pkeys[SSL_PKEY_RSA_ENC]);	rsa_enc= (cpk->x509 != NULL && cpk->privatekey != NULL);	rsa_enc_export=(rsa_enc && EVP_PKEY_size(cpk->privatekey)*8 <= kl);	cpk= &(c->pkeys[SSL_PKEY_RSA_SIGN]);	rsa_sign=(cpk->x509 != NULL && cpk->privatekey != NULL);	cpk= &(c->pkeys[SSL_PKEY_DSA_SIGN]);	dsa_sign=(cpk->x509 != NULL && cpk->privatekey != NULL);	cpk= &(c->pkeys[SSL_PKEY_DH_RSA]);	dh_rsa=  (cpk->x509 != NULL && cpk->privatekey != NULL);	dh_rsa_export=(dh_rsa && EVP_PKEY_size(cpk->privatekey)*8 <= kl);	cpk= &(c->pkeys[SSL_PKEY_DH_DSA]);/* FIX THIS EAY EAY EAY */	dh_dsa=  (cpk->x509 != NULL && cpk->privatekey != NULL);	dh_dsa_export=(dh_dsa && EVP_PKEY_size(cpk->privatekey)*8 <= kl);	mask=0;	emask=0;#ifdef CIPHER_DEBUG	printf("rt=%d dht=%d re=%d rs=%d ds=%d dhr=%d dhd=%d\n",		rsa_tmp,dh_tmp,		rsa_enc,rsa_sign,dsa_sign,dh_rsa,dh_dsa);#endif	if (rsa_enc || (rsa_tmp && rsa_sign))		mask|=SSL_kRSA;	if (rsa_enc_export || (rsa_tmp_export && rsa_sign))		emask|=SSL_kRSA;#if 0	/* The match needs to be both kEDH and aRSA or aDSA, so don't worry */	if (	(dh_tmp || dh_rsa || dh_dsa) && 		(rsa_enc || rsa_sign || dsa_sign))		mask|=SSL_kEDH;	if ((dh_tmp_export || dh_rsa_export || dh_dsa_export) &&		(rsa_enc || rsa_sign || dsa_sign))		emask|=SSL_kEDH;#endif	if (dh_tmp_export) 		emask|=SSL_kEDH;	if (dh_tmp)		mask|=SSL_kEDH;	if (dh_rsa) mask|=SSL_kDHr;	if (dh_rsa_export) emask|=SSL_kDHr;	if (dh_dsa) mask|=SSL_kDHd;	if (dh_dsa_export) emask|=SSL_kDHd;	if (rsa_enc || rsa_sign)		{		mask|=SSL_aRSA;		emask|=SSL_aRSA;		}	if (dsa_sign)		{		mask|=SSL_aDSS;		emask|=SSL_aDSS;		}#ifdef SSL_ALLOW_ADH	mask|=SSL_aNULL;	emask|=SSL_aNULL;#endif	c->mask=mask;	c->export_mask=emask;	c->valid=1;	}