ASN1err(ASN1_F_D2I_NETSCAPE_RSA_2,ASN1_R_UNABLE_TO_DECODE_RSA_KEY);
ASN1err(ASN1_F_D2I_RSA_NET_2,ASN1_R_UNABLE_TO_DECODE_RSA_KEY);
static RSA *d2i_RSA_NET_2(RSA **a, ASN1_OCTET_STRING *os,			  int (*cb)(char *buf, int len, const char *prompt,				    int verify), int sgckey)	{	NETSCAPE_PKEY *pkey=NULL;	RSA *ret=NULL;	int i,j;	unsigned char buf[256];	const unsigned char *zz;	unsigned char key[EVP_MAX_KEY_LENGTH];	EVP_CIPHER_CTX ctx;	i=cb((char *)buf,256,"Enter Private Key password:",0);	if (i != 0)		{		ASN1err(ASN1_F_D2I_NETSCAPE_RSA_2,ASN1_R_BAD_PASSWORD_READ);		goto err;		}	i = strlen((char *)buf);	if(sgckey){		EVP_Digest(buf, i, buf, NULL, EVP_md5(), NULL);		memcpy(buf + 16, "SGCKEYSALT", 10);		i = 26;	}			EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL);	OPENSSL_cleanse(buf,256);	EVP_CIPHER_CTX_init(&ctx);	EVP_DecryptInit_ex(&ctx,EVP_rc4(),NULL, key,NULL);	EVP_DecryptUpdate(&ctx,os->data,&i,os->data,os->length);	EVP_DecryptFinal_ex(&ctx,&(os->data[i]),&j);	EVP_CIPHER_CTX_cleanup(&ctx);	os->length=i+j;	zz=os->data;	if ((pkey=d2i_NETSCAPE_PKEY(NULL,&zz,os->length)) == NULL)		{		ASN1err(ASN1_F_D2I_NETSCAPE_RSA_2,ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY);		goto err;		}			zz=pkey->private_key->data;	if ((ret=d2i_RSAPrivateKey(a,&zz,pkey->private_key->length)) == NULL)		{		ASN1err(ASN1_F_D2I_NETSCAPE_RSA_2,ASN1_R_UNABLE_TO_DECODE_RSA_KEY);		goto err;		}err:	NETSCAPE_PKEY_free(pkey);	return(ret);	}