private void VerifyRopSeekStream(RopSeekStreamResponse ropSeekStreamResponse, SeekStreamCondition seekStereamCondition)
{
// Since the RopSeekStream ROP response was parsed successfully, MS-OXCPRPT_R57902 can be captured directly.
Site.CaptureRequirement(
57902,
@"[In Processing RopSeekStream] The server responds with a RopSeekStream ROP response buffer.");
// CPRPTErrorCode.None indicates the operation is performed successfully.
if (ropSeekStreamResponse.ReturnValue.Equals((uint)CPRPTErrorCode.None))
{
// If this operation is performed successfully, that means this operation is valid on Stream objects.
Site.CaptureRequirement(
33101,
@"[In RopSeekStream ROP] This ROP is valid on Stream objects.");
// Since the RopSeekStream ROP response is performed successfully, MS-OXCPRPT_R581 can be captured directly.
Site.CaptureRequirement(
581,
@"[In Processing RopSeekStream] The server modifies the location of the seek point associated with the Stream object according to the ROP request buffer. ");
// Since the RopSeekStream ROP response is performed successfully, MS-OXCPRPT_R330 can be captured directly.
Site.CaptureRequirement(
330,
@"[In RopSeekStream ROP] RopSeekStream sets the seek pointer to a new location.");
// The parser has ensured the field satisfied the format, otherwise the response cannot be received.
Site.CaptureRequirement(
341,
@"[In RopSeekStream ROP Response Buffer] NewPosition (8 bytes): An integer.");
}
if (seekStereamCondition == SeekStreamCondition.OriginInvalid)
{
if (Common.IsRequirementEnabled(903, this.Site))
{
Site.CaptureRequirementIfAreEqual<uint>(
(uint)CPRPTErrorCode.StreamInvalidParam,
ropSeekStreamResponse.ReturnValue,
903,
@"[In Processing RopSeekStream] Implementation does return error code ""0x80030057"" with name ""StreamInvalidParam"", when The value of the Origin field is invalid.(Microsoft Exchange Server 2007 and above follow this behavior)");
}
}
if (seekStereamCondition == SeekStreamCondition.MovedBeyondMaxStreamSize)
{
if (Common.IsRequirementEnabled(894, this.Site))
{
Site.CaptureRequirementIfAreEqual<uint>(
(uint)CPRPTErrorCode.StreamSeekError,
ropSeekStreamResponse.ReturnValue,
894,
@"[In Appendix A: Product Behavior] Implementation does return error code ""0x80030019"" with name ""StreamSeekError"", When Tried to seek to offset before the start or beyond the max stream size of 2^31.(Microsoft Exchange Server 2007 and above follow this behavior)");
}
}
}
#endregion