/// <summary> /// Verify RopAbort Failure Response /// </summary> /// <param name="ropAbortResponse">The response of RopAbort request</param> /// <param name="inputHandleIndex">The field of InputHandleIndex in RopAbort request</param> private void VerifyRopAbortFailureResponse(RopAbortResponse ropAbortResponse, byte inputHandleIndex) { // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R1221"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R1221 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), ropAbortResponse.RopId.GetType(), 1221, @"[In RopAbort ROP Failure Response Buffer] RopId (1 byte): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R1223"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R1223 Site.CaptureRequirementIfAreEqual<byte>( (byte)RopId.RopAbort, ropAbortResponse.RopId, 1223, @"[In RopAbort ROP Failure Response Buffer] RopId (1 byte): For this operation[RopAbort], this field[RopId (1 byte)] is set to 0x38."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R1224"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R1224 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), ropAbortResponse.InputHandleIndex.GetType(), 1224, @"[In RopAbort ROP Failure Response Buffer] InputHandleIndex (1 byte): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R1225"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R1225 Site.CaptureRequirementIfAreEqual<byte>( inputHandleIndex, ropAbortResponse.InputHandleIndex, 1225, @"[In RopAbort ROP Failure Response Buffer] InputHandleIndex (1 byte): This index MUST be set to the value specified in the InputHandleIndex field in the request. "); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R1227"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R1227 Site.CaptureRequirementIfAreEqual<Type>( typeof(uint), ropAbortResponse.ReturnValue.GetType(), 1227, @"[In RopAbort ROP Failure Response Buffer] ReturnValue (4 bytes): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R1229"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R1229 Site.CaptureRequirementIfAreNotEqual<uint>( SuccessReturnValue, ropAbortResponse.ReturnValue, 1229, @"[In RopAbort ROP Failure Response Buffer] ReturnValue (4 bytes): For this response[Failure Response], this field is set to a value other than 0x00000000."); }
/// <summary> /// Verify RopAbort Response /// </summary> /// <param name="abortResponse">RopAbortResponse structure data that needs verification</param> private void VerifyRopAbortResponse(RopAbortResponse abortResponse) { this.VerifyRPCLayerRequirement(); if (Common.IsRequirementEnabled(791, this.Site)) { // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCTABL_R791"); // Verify MS-OXCTABL requirement: MS-OXCTABL_R791 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), abortResponse.TableStatus.GetType(), 791, @"[In Appendix A: Product Behavior] TableStatus (1 byte): An enumeration that indicates the status of asynchronous operations being performed on the table before the abort on the implementation. (Microsoft Exchange Server 2007 follows this behavior.)"); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCTABL_R127: the value of the TableStatus field in the response for RopAbort is set to {0}", abortResponse.TableStatus); // Verify MS-OXCTABL requirement: MS-OXCTABL_R127 bool isVerifyR127 = (abortResponse.TableStatus == 0x00) || (abortResponse.TableStatus == 0x09) || (abortResponse.TableStatus == 0x0A) || (abortResponse.TableStatus == 0x0B) || (abortResponse.TableStatus == 0x0D) || (abortResponse.TableStatus == 0x0E) || (abortResponse.TableStatus == 0x0F); Site.CaptureRequirementIfIsTrue( isVerifyR127, 127, @"[In RopAbort ROP Response Buffer] Its value MUST be one of the table status values [0x00,0x09,0x0A,0x0B,0x0D,0x0E,0x0F] that are specified in section 2.2.2.1.3."); // If there were no asynchronous operations to abort, or the server was unable to abort the operations. // The error code ecUnableToAbort will be returned with value 0x80040114. if (abortResponse.ReturnValue == 0x80040114) { // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCTABL_R479"); // Here it can partially verify MS-OXCTABL requirement: MS-OXCTABL_R479 Site.CaptureRequirement( 479, @"[In Processing RopAbort] The RopAbort ROP ([MS-OXCROPS] section 2.2.5.5) MUST abort the current asynchronous table ROP that is executing on the table or send an error if there is nothing to abort or if it fails to abort."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCTABL_R485"); // Verify MS-OXCTABL requirement: MS-OXCTABL_R485 Site.CaptureRequirement( 485, @"[In Processing RopAbort] The error code ecUnableToAbort will be returned with value 0x80040114,%x14.01.04.80, if there were no asynchronous operations to abort, or the server was unable to abort the operations."); } } }
/// <summary> /// Verify RopAbort Success Response /// </summary> /// <param name="ropAbortResponse">The response of RopAbort request</param> /// <param name="inputHandleIndex">The field of InputHandleIndex in RopAbort request</param> private void VerifyRopAbortSuccessResponse(RopAbortResponse ropAbortResponse, byte inputHandleIndex) { // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R1210"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R1210 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), ropAbortResponse.RopId.GetType(), 1210, @"[In RopAbort ROP Success Response Buffer] RopId (1 byte): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R1212"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R1212 Site.CaptureRequirementIfAreEqual<byte>( (byte)RopId.RopAbort, ropAbortResponse.RopId, 1212, @"[In RopAbort ROP Success Response Buffer] RopId (1 byte): For this operation[RopAbort], this field[RopId (1 byte)] is set to 0x38."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R1213"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R1213 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), ropAbortResponse.InputHandleIndex.GetType(), 1213, @"[In RopAbort ROP Success Response Buffer] InputHandleIndex (1 byte): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R1214"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R1214 Site.CaptureRequirementIfAreEqual<byte>( inputHandleIndex, ropAbortResponse.InputHandleIndex, 1214, @"[In RopAbort ROP Success Response Buffer] InputHandleIndex (1 byte): This index MUST be set to the value specified in the InputHandleIndex field in the request."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R1215"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R1215 Site.CaptureRequirementIfAreEqual<Type>( typeof(uint), ropAbortResponse.ReturnValue.GetType(), 1215, @"[In RopAbort ROP Success Response Buffer] ReturnValue (4 bytes): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R1217"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R1217 Site.CaptureRequirementIfAreEqual<uint>( SuccessReturnValue, ropAbortResponse.ReturnValue, 1217, @"[In RopAbort ROP Success Response Buffer] ReturnValue (4 bytes): For this response[Success Response], this field is set to 0x00000000."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R1218"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R1218 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), ropAbortResponse.TableStatus.GetType(), 1218, @"[In RopAbort ROP Success Response Buffer] TableStatus (1 byte): An enumeration."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R1219,TableStatus:{0}", ropAbortResponse.TableStatus); // Verify MS-OXCROPS requirement: MS-OXCROPS_R1219 bool isVerifyR1219 = ((ropAbortResponse.TableStatus & ((byte)TableStatus.TblstatComplete)) == ((byte)TableStatus.TblstatComplete)) || ((ropAbortResponse.TableStatus & ((byte)TableStatus.TblstatSorting)) == ((byte)TableStatus.TblstatSorting)) || ((ropAbortResponse.TableStatus & ((byte)TableStatus.TblstatSortError)) == ((byte)TableStatus.TblstatSortError)) || ((ropAbortResponse.TableStatus & ((byte)TableStatus.TblstatSettingCols)) == ((byte)TableStatus.TblstatSettingCols)) || ((ropAbortResponse.TableStatus & ((byte)TableStatus.TblstatSetColError)) == ((byte)TableStatus.TblstatSetColError)) || ((ropAbortResponse.TableStatus & ((byte)TableStatus.TblstatRestricting)) == ((byte)TableStatus.TblstatRestricting)) || ((ropAbortResponse.TableStatus & ((byte)TableStatus.TblstatRestrictError)) == ((byte)TableStatus.TblstatRestrictError)); Site.CaptureRequirementIfIsTrue( isVerifyR1219, 1219, @"[In RopAbort ROP Success Response Buffer] TableStatus (1 byte): The possible values[the value of TBLSTAT_COMPLETE is 0x00, the value of TBLSTAT_SORTING is 0x09, the value of TBLSTAT_SORT_ERROR is 0x0A, the value of TBLSTAT_SETTING_COLS is 0x0B, the value of TBLSTAT_SETCOL_ERROR is 0x0D, the value of TBLSTAT_RESTRICTING is 0x0E and the value of TBLSTAT_RESTRICT_ERROR is 0x0F] for this enumeration are specified in [MS-OXCTABL] section 2.2.2.1.3."); }