OPENSSL_assert(c->iv_len <= sizeof s->session->key_arg);
int ssl2_enc_init(SSL *s, int client)	{	/* Max number of bytes needed */	EVP_CIPHER_CTX *rs,*ws;	const EVP_CIPHER *c;	const EVP_MD *md;	int num;	if (!ssl_cipher_get_evp(s->session,&c,&md,NULL))		{		ssl2_return_error(s,SSL2_PE_NO_CIPHER);		SSLerr(SSL_F_SSL2_ENC_INIT,SSL_R_PROBLEMS_MAPPING_CIPHER_FUNCTIONS);		return(0);		}	s->read_hash=md;	s->write_hash=md;	if ((s->enc_read_ctx == NULL) &&		((s->enc_read_ctx=(EVP_CIPHER_CTX *)		OPENSSL_malloc(sizeof(EVP_CIPHER_CTX))) == NULL))		goto err;	if ((s->enc_write_ctx == NULL) &&		((s->enc_write_ctx=(EVP_CIPHER_CTX *)		OPENSSL_malloc(sizeof(EVP_CIPHER_CTX))) == NULL))		goto err;	rs= s->enc_read_ctx;	ws= s->enc_write_ctx;	EVP_CIPHER_CTX_init(rs);	EVP_CIPHER_CTX_init(ws);	num=c->key_len;	s->s2->key_material_length=num*2;	if (ssl2_generate_key_material(s) <= 0)		return 0;	EVP_EncryptInit_ex(ws,c,NULL,&(s->s2->key_material[(client)?num:0]),		s->session->key_arg);	EVP_DecryptInit_ex(rs,c,NULL,&(s->s2->key_material[(client)?0:num]),		s->session->key_arg);	s->s2->read_key=  &(s->s2->key_material[(client)?0:num]);	s->s2->write_key= &(s->s2->key_material[(client)?num:0]);	return(1);err:	SSLerr(SSL_F_SSL2_ENC_INIT,ERR_R_MALLOC_FAILURE);	return(0);	}