PORT_Assert(key->keyType == rsaKey); if (key->keyType != rsaKey)
PORT_Assert(key->keyType == lowRSAKey); if (key->keyType != lowRSAKey)
RSA_CheckSign(SECKEYLowPublicKey *key,              unsigned char *     sign, 	      unsigned int        sign_len, 	      unsigned char *     hash, 	      unsigned int        hash_len){    SECStatus       rv;    unsigned int    modulus_len = SECKEY_LowPublicModulusLen(key);    unsigned int    i;    unsigned char * buffer;    modulus_len = SECKEY_LowPublicModulusLen(key);    if (sign_len != modulus_len)     	goto failure;    if (hash_len > modulus_len - 8)     	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;    /*     * check the padding that was used     */    if (buffer[0] != 0 || buffer[1] != 1)     	goto loser;    for (i = 2; i < modulus_len - hash_len - 1; i++) {	if (buffer[i] == 0) 	    break;	if (buffer[i] != 0xff) 	    goto loser;    }    /*     * make sure we get the same results     */    if (PORT_Memcmp(buffer + modulus_len - hash_len, hash, hash_len) != 0)	goto loser;    PORT_Free(buffer);    return SECSuccess;loser:    PORT_Free(buffer);failure:    return SECFailure;}