Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: net/third_party/nist-pkits/generate_tests.py

Issue 2918063002: Revert of Add policies support to VerifyCertificateChain(). (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 '''Generates a test suite from NIST PKITS test descriptions. 5 '''Generates a test suite from NIST PKITS test descriptions.
6 6
7 The output is a set of Type Parameterized Tests which are included by 7 The output is a set of Type Parameterized Tests which are included by
8 pkits_unittest.h. See pkits_unittest.h for information on using the tests. 8 pkits_unittest.h. See pkits_unittest.h for information on using the tests.
9 GoogleTest has a limit of 50 tests per type parameterized testcase, so the tests 9 GoogleTest has a limit of 50 tests per type parameterized testcase, so the tests
10 are split up by section number (this also makes it possible to easily skip 10 are split up by section number (this also makes it possible to easily skip
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 # The path should validate successfully. 681 # The path should validate successfully.
682 TestInfo(True, initial_policy_set=[TEST_POLICY_1], 682 TestInfo(True, initial_policy_set=[TEST_POLICY_1],
683 user_constrained_policy_set=[TEST_POLICY_1]), 683 user_constrained_policy_set=[TEST_POLICY_1]),
684 684
685 # 2. default settings, but with initial-policy-set = {NIST-test-policy-6}. 685 # 2. default settings, but with initial-policy-set = {NIST-test-policy-6}.
686 # The path should not validate successfully. 686 # The path should not validate successfully.
687 TestInfo(False, initial_policy_set=[TEST_POLICY_6], 687 TestInfo(False, initial_policy_set=[TEST_POLICY_6],
688 user_constrained_policy_set=[]), 688 user_constrained_policy_set=[]),
689 ], 689 ],
690 690
691 '4.10.7': [ # Invalid Mapping From anyPolicy Test7
692 # Procedure: Validate Invalid Mapping From anyPolicy Test7 EE using the
693 # default settings or open and verify Signed Test Message 6.2.2.100 using
694 # the default settings.
695 #
696 # Expected Result: The path should not validate successfully since the
697 # intermediate certificate includes a policy mapping extension in which
698 # anyPolicy appears as an issuerDomainPolicy.
699 TestInfo(False, user_constrained_policy_set=[]),
700 ],
701
702 '4.10.8': [ # Invalid Mapping To anyPolicy Test8 691 '4.10.8': [ # Invalid Mapping To anyPolicy Test8
703 # Procedure: Validate Invalid Mapping To anyPolicy Test8 EE using the 692 # Procedure: Validate Invalid Mapping To anyPolicy Test8 EE using the
704 # default settings or open and verify Signed Test Message 6.2.2.101 using 693 # default settings or open and verify Signed Test Message 6.2.2.101 using
705 # the default settings. 694 # the default settings.
706 # 695 #
707 # Expected Result: The path should not validate successfully since the 696 # Expected Result: The path should not validate successfully since the
708 # intermediate certificate includes a policy mapping extension in which 697 # intermediate certificate includes a policy mapping extension in which
709 # anyPolicy appears as an subjectDomainPolicy. 698 # anyPolicy appears as an subjectDomainPolicy.
699 #
700 # TODO(eroman): What should user_constrained_policy_set be?
710 TestInfo(False, user_constrained_policy_set=[]), 701 TestInfo(False, user_constrained_policy_set=[]),
711 ], 702 ],
712 703
713 '4.10.9': [ # Valid Policy Mapping Test9 704 '4.10.9': [ # Valid Policy Mapping Test9
714 # Procedure: Validate Valid Policy Mapping Test9 EE using the default 705 # Procedure: Validate Valid Policy Mapping Test9 EE using the default
715 # settings or open and verify Signed Test Message 6.2.2.102 using the 706 # settings or open and verify Signed Test Message 6.2.2.102 using the
716 # default settings. 707 # default settings.
717 # 708 #
718 # Expected Result: The authorities-constrained-policy-set will be 709 # Expected Result: The authorities-constrained-policy-set will be
719 # {NIST-test-policy-1} and the explicit-policy-indicator will be set (if 710 # {NIST-test-policy-1} and the explicit-policy-indicator will be set (if
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 continue 1211 continue
1221 i, parse_test(lines, i, test_case_name, test_number, 1212 i, parse_test(lines, i, test_case_name, test_number,
1222 test_name, sanitized_test_names, output) 1213 test_name, sanitized_test_names, output)
1223 1214
1224 if test_case_name: 1215 if test_case_name:
1225 finalize_test_case(test_case_name, sanitized_test_names, output) 1216 finalize_test_case(test_case_name, sanitized_test_names, output)
1226 1217
1227 1218
1228 if __name__ == '__main__': 1219 if __name__ == '__main__':
1229 main() 1220 main()
OLDNEW
« no previous file with comments | « net/cert/internal/verify_certificate_chain_unittest.cc ('k') | net/third_party/nist-pkits/pkits_testcases-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698