PORT_Assert(key->keyType == rsaKey); if (key->keyType != rsaKey)
PORT_Assert(key->keyType == lowRSAKey); if (key->keyType != lowRSAKey)
RSA_CheckSignRecover(SECKEYLowPublicKey *key,                     unsigned char *     data,                     unsigned int *      data_len, 		     unsigned int        max_output_len, 		     unsigned char *     sign,		     unsigned int        sign_len){    SECStatus       rv;    unsigned int    modulus_len = SECKEY_LowPublicModulusLen(key);    unsigned int    i;    unsigned char * buffer;    if (sign_len != modulus_len)     	goto failure;    PORT_Assert(key->keyType == rsaKey);    if (key->keyType != rsaKey)    	goto failure;    buffer = (unsigned char *)PORT_Alloc(modulus_len + 1);    if (!buffer)    	goto failure;    rv = RSA_PublicKeyOp(&key->u.rsa, buffer, sign);    if (rv != SECSuccess)    	goto loser;    *data_len = 0;    /*     * check the padding that was used     */    if (buffer[0] != 0 || buffer[1] != 1)     	goto loser;    for (i = 2; i < modulus_len; i++) {	if (buffer[i] == 0) {	    *data_len = modulus_len - i - 1;	    break;	}	if (buffer[i] != 0xff) 	    goto loser;    }    if (*data_len == 0)     	goto loser;    if (*data_len > max_output_len)     	goto loser;    /*     * make sure we get the same results     */    PORT_Memcpy(data,buffer + modulus_len - *data_len, *data_len);    PORT_Free(buffer);    return SECSuccess;loser:    PORT_Free(buffer);failure:    return SECFailure;}