Commit 17fb33c1 authored by berge's avatar berge
Browse files

Added LDS_A*, LDS_B*, LDS_C* testcases

parent ca5e93e5
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -14,18 +14,23 @@ module ePassport_MainModule {
    import from ePassport_Testcases all; 

    control {    
        // ISO7816_A
    	execute(TC_ISO7816_A02());  
    	
    	// ISO7816_B
    	execute(TC_ISO7816_B07());
    	execute(TC_ISO7816_B08());
    	
    	// ISO7816_C
    	execute(TC_ISO7816_C02());
    	execute(TC_ISO7816_C03());
    	
    	// ISO7816_D
    	execute(TC_ISO7816_D02());
    	execute(TC_ISO7816_D04());
    	execute(TC_ISO7816_D11());  
    	
    	// ISO7816_E
    	execute(TC_ISO7816_E06());   
    	execute(TC_ISO7816_E08());  
    	execute(TC_ISO7816_E11());
@@ -33,14 +38,31 @@ module ePassport_MainModule {
    	execute(TC_ISO7816_E18());
    	execute(TC_ISO7816_E28());  
    	
    	// ISO7816_F
    	execute(TC_ISO7816_F05());  
    	
    	// LDS_A
    	execute(TC_LDS_A03());
    	execute(TC_LDS_A04());  
    	
    	// LDS_B
    	execute(TC_LDS_B11());
    	execute(TC_LDS_B22());
    	execute(TC_LDS_B25());   
    	
    	// LDS_C
    	execute(TC_LDS_C03());
    	execute(TC_LDS_C09());
    	execute(TC_LDS_C13());
    	execute(TC_LDS_C19());
    	
    	// LDS_D
    	execute(TC_LDS_D12());  
    	
    	// LDS_F
    	execute(TC_LDS_F04());    
    	
    	// LDS_H
    	execute(TC_LDS_H37());       	
    }
}
+351 −4
Original line number Diff line number Diff line
@@ -692,9 +692,180 @@ module ePassport_Testcases {
	    
	} // end groupISO7816_F
	
	// Tests with EF.DG1
	group groupLDS_A {
	    
        // LDS_A03: DG tag 60 length byte too big
        // Purpose: This test case verifies that the inspection system performs correctly if EF.COM is
		// wrong (length byte of tag 60 is too big).
        // Profile: SIP
        // Configuration file: default EAC + EF.COM Tag 60 length byte increased to 7F
        // Expected results: "ePassport inspection procedure failed" 
        // Interface: BAC: PASS, PA: PASS, AA: NP, TA: NP, CA: NP, COM: FAIL, EF:COM: FAIL       
        testcase TC_LDS_A03() runs on MRTD system MRTD_System {
    
            var template IsVerdictList vt_expectedFailResults := {
            	e_aisCommunication,
            	e_aisEfCom
            };
        	var template IsVerdictList vt_expectedPassResults := {
        	    e_aisBacAuthentication,
        	    e_aisPassiveAuthentication        	    
        	};
    
    		// Preamble
    	   	f_cfUp();
        	f_initializeMRTD("CFG.EAC.LDS.A03");
        	f_initializeIS(""); 
    	
    		// Test Body
    		t_ac.start(PXT_TWAIT);
        	alt {
        		[] a_standardInspectionProcedure();
        
        		[PXT_AUTOMATIC_TEST_INTERFACE] a_aisReports();
         		
        		[] t_ac.timeout {
        			log("**** TC_LDS_A03: Timeout: No more communication ****");
        		}
        	}       	    
        	
			f_establishVerdict("TC_LDS_A03", vt_expectedFailResults, vt_expectedPassResults);
			
			// Postamble
			f_cleanUp();
    	    
    	} // end TC_LDS_A03

        // LDS_A04: Incorrect LDS version (use V3.0 instead)
        // Purpose: This test case verifies that the inspection system performs correctly if EF.COM is
		// wrong (incorrect LDS version).
        // Profile: SIP
        // Configuration file: default EAC + LDS version is set to V3.0
        // Expected results: "ePassport inspection procedure failed" 
        // Interface: BAC: PASS, PA: PASS, AA: NP, TA: NP, CA: NP, COM: PASS, EF:COM: FAIL       
        testcase TC_LDS_A04() runs on MRTD system MRTD_System {
    
            var template IsVerdictList vt_expectedFailResults := {
            	e_aisEfCom
            };
        	var template IsVerdictList vt_expectedPassResults := {
        	    e_aisBacAuthentication,
        	    e_aisPassiveAuthentication,
        	    e_aisCommunication	        	    
        	};
    
    		// Preamble
    	   	f_cfUp();
        	f_initializeMRTD("CFG.EAC.LDS.A04");
        	f_initializeIS(""); 
    	
    		// Test Body
    		t_ac.start(PXT_TWAIT);
        	alt {
        		[] a_standardInspectionProcedure();
        
        		[PXT_AUTOMATIC_TEST_INTERFACE] a_aisReports();
         		
        		[] t_ac.timeout {
        			log("**** TC_LDS_A04: Timeout: No more communication ****");
        		}
        	}       	    
        	
			f_establishVerdict("TC_LDS_A04", vt_expectedFailResults, vt_expectedPassResults);
			
			// Postamble
			f_cleanUp();
    	    
    	} // end TC_LDS_A04
	    
	} // end groupLDS_A     

	group groupLDS_B {	

        // LDS_B11: Incorrect MRZ, name different from data page
        // Purpose: This test case verifies that the inspection system performs correctly if EF.DG1 is
		// wrong (name in DG1 and on data page are different).
        // Profile: SIP
        // Configuration file: default BAC + EF.DG1 with different name than on data page
        // Expected results: "ePassport inspection procedure failed" 
        // Interface: BAC: PASS, PA: PASS, AA: NP, TA: NP, CA: NP, COM: PASS, DG1:FAIL      
        testcase TC_LDS_B11() runs on MRTD system MRTD_System {
    
            var template IsVerdictList vt_expectedFailResults := {
                e_aisDg1
            };
        	var template IsVerdictList vt_expectedPassResults := {
        	    e_aisBacAuthentication,
        	    e_aisPassiveAuthentication,
        	    e_aisCommunication
        	};
    
    		// Preamble
    	   	f_cfUp();
        	f_initializeMRTD("CFG.BAC.LDS.B11");
        	f_initializeIS(""); 
    	
    		// Test Body
    		t_ac.start(PXT_TWAIT);
        	alt {
        		[] a_standardInspectionProcedure();
        
        		[PXT_AUTOMATIC_TEST_INTERFACE] a_aisReports();
         		
        		[] t_ac.timeout {
        			log("**** TC_LDS_B11: Timeout: No more communication ****");
        		}
        	}       	    
        	
			f_establishVerdict("TC_LDS_B11", vt_expectedFailResults, vt_expectedPassResults);
			
			// Postamble
			f_cleanUp();
    	    
    	} // end TC_LDS_B11

        // LDS_B22: Incorrect MRZ, incorrect optional data checksum
        // Purpose: This test case verifies that the inspection system performs correctly if EF.DG1 is
		// wrong (incorrect checksum of optional data)
        // Profile: SIP
        // Configuration file: default BAC + EF.DG1 with incorrect checksum of optional data
        // Expected results: "ePassport inspection procedure failed" 
        // Interface: BAC: PASS, PA: PASS, AA: NP, TA: NP, CA: NP, COM: PASS, DG1:FAIL     
        testcase TC_LDS_B22() runs on MRTD system MRTD_System {
    
            var template IsVerdictList vt_expectedFailResults := {
                e_aisDg1
            };
        	var template IsVerdictList vt_expectedPassResults := {
        	    e_aisBacAuthentication,
        	    e_aisPassiveAuthentication,
        	    e_aisCommunication
        	};
    
    		// Preamble
    	   	f_cfUp();
        	f_initializeMRTD("CFG.BAC.LDS.B22");
        	f_initializeIS(""); 
    	
    		// Test Body
    		t_ac.start(PXT_TWAIT);
        	alt {
        		[] a_standardInspectionProcedure();
        
        		[PXT_AUTOMATIC_TEST_INTERFACE] a_aisReports();
         		
        		[] t_ac.timeout {
        			log("**** TC_LDS_B22: Timeout: No more communication ****");
        		}
        	}       	    
        	
			f_establishVerdict("TC_LDS_B22", vt_expectedFailResults, vt_expectedPassResults);
			
			// Postamble
			f_cleanUp();
    	    
    	} // end TC_LDS_B22

        // LDS_B25: Incomplete birth date (missing day)
        // Purpose: This test case verifies that the inspection system performs correctly if EF.DG1
        // stores a incomplete birth date (missing day)
@@ -738,7 +909,185 @@ module ePassport_Testcases {
	
	} // end groupLDS_B
	
	// Tests with EF.DG3
	group groupLDS_C {

        // LDS_C03: JPEG2000 image, full frontal with additional facial feature points
        // Purpose: This test case verifies that the inspection system performs correctly if EF.DG2
		// contains an image in JPEG2000 format with addditional facial feature points
        // Profile: AIP
        // Configuration file: default EAC + Facial image with additional facial feature points
        // Expected results: "ePassport inspection procedure successful" 
        // Interface: BAC: PASS, PA: PASS, AA: NP, TA: PASS, CA: PASS, COM: PASS    
        testcase TC_LDS_C03() runs on MRTD system MRTD_System {
    
            var template IsVerdictList vt_expectedFailResults := {};
        	var template IsVerdictList vt_expectedPassResults := {
        	    e_aisNoFailure,
        	    e_aisBacAuthentication,
        	    e_aisPassiveAuthentication,
        	    e_aisChipAuthentication,
        	    e_aisTerminalAuthentication,
        	    e_aisCommunication
        	};
    
    		// Preamble
    	   	f_cfUp();
        	f_initializeMRTD("CFG.EAC.LDS.C03");
        	f_initializeIS(""); 
    	
    		// Test Body
    		t_ac.start(PXT_TWAIT);
        	alt {
        		[] a_advancedInspectionProcedure();
        
        		[PXT_AUTOMATIC_TEST_INTERFACE] a_aisReports();
         		
        		[] t_ac.timeout {
        			log("**** TC_LDS_C03: Timeout: No more communication ****");
        		}
        	}       	    
        	
			f_establishVerdict("TC_LDS_C03", vt_expectedFailResults, vt_expectedPassResults);
			
			// Postamble
			f_cleanUp();
    	    
    	} // end TC_LDS_C03

        // LDS_C09: BHT, missing format owner
        // Purpose: This test case verifies that the inspection system performs correctly if EF.DG2 is
		// wrong (BHT, missing format owner)
        // Profile: AIP
        // Configuration file: default EAC + EF.DG2 with missing format owner in BHT
        // Expected results: "ePassport inspection procedure failed" 
        // Interface: BAC: PASS, PA: PASS, AA: NP, TA: PASS, CA: PASS, COM: PASS, DG2: FAIL   
        testcase TC_LDS_C09() runs on MRTD system MRTD_System {
    
            var template IsVerdictList vt_expectedFailResults := {
            	e_aisDg2
            };
        	var template IsVerdictList vt_expectedPassResults := {
        	    e_aisBacAuthentication,
        	    e_aisPassiveAuthentication,
        	    e_aisChipAuthentication,
        	    e_aisTerminalAuthentication,
        	    e_aisCommunication
        	};
    
    		// Preamble
    	   	f_cfUp();
        	f_initializeMRTD("CFG.EAC.LDS.C09");
        	f_initializeIS(""); 
    	
    		// Test Body
    		t_ac.start(PXT_TWAIT);
        	alt {
        		[] a_advancedInspectionProcedure();
        
        		[PXT_AUTOMATIC_TEST_INTERFACE] a_aisReports();
         		
        		[] t_ac.timeout {
        			log("**** TC_LDS_C09: Timeout: No more communication ****");
        		}
        	}       	    
        	
			f_establishVerdict("TC_LDS_C09", vt_expectedFailResults, vt_expectedPassResults);
			
			// Postamble
			f_cleanUp();
    	    
    	} // end TC_LDS_C09

        // LDS_C13: BHT, incorrect biometric type
        // Purpose: This test case verifies that the inspection system performs correctly if EF.DG2 is
		// wrong (BHT, incorrect biometric type)
        // Profile: AIP
        // Configuration file: default EAC + EF.DG2 with incorrect biometric type in BHT ('01')
        // Expected results: "ePassport inspection procedure failed" 
        // Interface: BAC: PASS, PA: PASS, AA: NP, TA: PASS, CA: PASS, COM: PASS, DG2: FAIL   
        testcase TC_LDS_C13() runs on MRTD system MRTD_System {
    
            var template IsVerdictList vt_expectedFailResults := {
            	e_aisDg2
            };
        	var template IsVerdictList vt_expectedPassResults := {
        	    e_aisBacAuthentication,
        	    e_aisPassiveAuthentication,
        	    e_aisChipAuthentication,
        	    e_aisTerminalAuthentication,
        	    e_aisCommunication
        	};
    
    		// Preamble
    	   	f_cfUp();
        	f_initializeMRTD("CFG.EAC.LDS.C13");
        	f_initializeIS(""); 
    	
    		// Test Body
    		t_ac.start(PXT_TWAIT);
        	alt {
        		[] a_advancedInspectionProcedure();
        
        		[PXT_AUTOMATIC_TEST_INTERFACE] a_aisReports();
         		
        		[] t_ac.timeout {
        			log("**** TC_LDS_C13: Timeout: No more communication ****");
        		}
        	}       	    
        	
			f_establishVerdict("TC_LDS_C13", vt_expectedFailResults, vt_expectedPassResults);
			
			// Postamble
			f_cleanUp();
    	    
    	} // end TC_LDS_C13

        // LDS_C19: FIB, incorrect hair colour
        // Purpose: This test case verifies that the inspection system performs correctly if EF.DG2 is
		// wrong (FIB, incorrect hair colour)
        // Profile: AIP
        // Configuration file: default EAC + EF.DG2 with incorrect hair colour in FIB. Set value to 08
        // Expected results: "ePassport inspection procedure failed" 
        // Interface: BAC: PASS, PA: PASS, AA: NP, TA: PASS, CA: PASS, COM: PASS, DG2: FAIL   
        testcase TC_LDS_C19() runs on MRTD system MRTD_System {
    
            var template IsVerdictList vt_expectedFailResults := {
            	e_aisDg2
            };
        	var template IsVerdictList vt_expectedPassResults := {
        	    e_aisBacAuthentication,
        	    e_aisPassiveAuthentication,
        	    e_aisChipAuthentication,
        	    e_aisTerminalAuthentication,
        	    e_aisCommunication
        	};
    
    		// Preamble
    	   	f_cfUp();
        	f_initializeMRTD("CFG.EAC.LDS.C19");
        	f_initializeIS(""); 
    	
    		// Test Body
    		t_ac.start(PXT_TWAIT);
        	alt {
        		[] a_advancedInspectionProcedure();
        
        		[PXT_AUTOMATIC_TEST_INTERFACE] a_aisReports();
         		
        		[] t_ac.timeout {
        			log("**** TC_LDS_C19: Timeout: No more communication ****");
        		}
        	}       	    
        	
			f_establishVerdict("TC_LDS_C19", vt_expectedFailResults, vt_expectedPassResults);
			
			// Postamble
			f_cleanUp();
    	    
    	} // end TC_LDS_C19
	    
	} // end groupLDS_C

	group groupLDS_D {	

        // LDS_D_12: BHT, incorrect biometric subtype
@@ -787,7 +1136,6 @@ module ePassport_Testcases {

	} // end groupLDS_D

	// Tests with EF.DG14
	group groupLDS_F {	

        // LDS_F04: SecurityInfos, illegal chip authentication OID
@@ -836,7 +1184,6 @@ module ePassport_Testcases {

	} // end groupLDS_F

	// Tests with EF.SOD
	group groupLDS_H {	

        // LDS_H37: SignerInfo, incorrect Signature