SUREWAREerr(SUREWARE_F_SUREWAREHK_RSA_PRIV_ENC,ENGINE_R_NOT_INITIALISED);
SUREWAREerr(SUREWARE_F_SUREWAREHK_RSA_SIGN,ENGINE_R_NOT_INITIALISED);
static int surewarehk_rsa_sign(int flen,const unsigned char *from,unsigned char *to,			    RSA *rsa,int padding){	int ret=0,tlen;	char *hptr=NULL;	char msg[64]="ENGINE_rsa_sign";	if (!p_surewarehk_Rsa_Sign)	{		SUREWAREerr(SUREWARE_F_SUREWAREHK_RSA_PRIV_ENC,ENGINE_R_NOT_INITIALISED);	}	/* extract ref to private key */	else if (!(hptr=RSA_get_ex_data(rsa, rsaHndidx)))	{		SUREWAREerr(SUREWARE_F_SUREWAREHK_RSA_PRIV_ENC,SUREWARE_R_MISSING_KEY_COMPONENTS);	}	else	{		switch (padding)		{		case RSA_PKCS1_PADDING: /* do it in one shot */			ret=p_surewarehk_Rsa_Sign(msg,flen,(unsigned char *)from,&tlen,to,hptr,SUREWARE_PKCS1_PAD);			surewarehk_error_handling(msg,SUREWARE_F_SUREWAREHK_RSA_PRIV_ENC,ret);			break;		case RSA_NO_PADDING:		default:			RSAerr(SUREWARE_F_SUREWAREHK_RSA_PRIV_ENC,RSA_R_UNKNOWN_PADDING_TYPE);		}	}	return ret==1 ? tlen : ret;}