case SSL_RD: switch(c->alg_bits) { case 128: i=SSL_ENC_RD128_IDX; break; case 192: i=SSL_ENC_RD192_IDX; break; case 256: i=SSL_ENC_RD256_IDX; break; default: i=-1; break; } break;
int ssl_cipher_get_evp(SSL_SESSION *s, const EVP_CIPHER **enc,	     const EVP_MD **md, SSL_COMP **comp)	{	int i;	SSL_CIPHER *c;	c=s->cipher;	if (c == NULL) return(0);	if (comp != NULL)		{		SSL_COMP ctmp;		if (s->compress_meth == 0)			*comp=NULL;		else if (ssl_comp_methods == NULL)			{			/* bad */			*comp=NULL;			}		else			{			ctmp.id=s->compress_meth;			i=sk_SSL_COMP_find(ssl_comp_methods,&ctmp);			if (i >= 0)				*comp=sk_SSL_COMP_value(ssl_comp_methods,i);			else				*comp=NULL;			}		}	if ((enc == NULL) || (md == NULL)) return(0);	switch (c->algorithms & SSL_ENC_MASK)		{	case SSL_DES:		i=SSL_ENC_DES_IDX;		break;	case SSL_3DES:		i=SSL_ENC_3DES_IDX;		break;	case SSL_RC4:		i=SSL_ENC_RC4_IDX;		break;	case SSL_RC2:		i=SSL_ENC_RC2_IDX;		break;	case SSL_IDEA:		i=SSL_ENC_IDEA_IDX;		break;	case SSL_eNULL:		i=SSL_ENC_NULL_IDX;		break;	default:		i= -1;		break;		}	if ((i < 0) || (i > SSL_ENC_NUM_IDX))		*enc=NULL;	else		{		if (i == SSL_ENC_NULL_IDX)			*enc=EVP_enc_null();		else			*enc=ssl_cipher_methods[i];		}	switch (c->algorithms & SSL_MAC_MASK)		{	case SSL_MD5:		i=SSL_MD_MD5_IDX;		break;	case SSL_SHA1:		i=SSL_MD_SHA1_IDX;		break;	default:		i= -1;		break;		}	if ((i < 0) || (i > SSL_MD_NUM_IDX))		*md=NULL;	else		*md=ssl_digest_methods[i];	if ((*enc != NULL) && (*md != NULL))		return(1);	else		return(0);	}