OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2016 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2016 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """A certificate tree with two self-signed root certificates(oldroot, newroot), | 6 """A certificate tree with two self-signed root certificates(oldroot, newroot), |
7 and a third root certificate (newrootrollover) which has the same key as newroot | 7 and a third root certificate (newrootrollover) which has the same key as newroot |
8 but is signed by oldroot, all with the same subject and issuer. | 8 but is signed by oldroot, all with the same subject and issuer. |
9 There are two intermediates with the same key, subject and issuer | 9 There are two intermediates with the same key, subject and issuer |
10 (oldintermediate signed by oldroot, and newintermediate signed by newroot). | 10 (oldintermediate signed by oldroot, and newintermediate signed by newroot). |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 oldchain = [target, oldintermediate] | 72 oldchain = [target, oldintermediate] |
73 rolloverchain = [target, newintermediate, newrootrollover] | 73 rolloverchain = [target, newintermediate, newrootrollover] |
74 longrolloverchain = [target, newintermediate, newroot, newrootrollover] | 74 longrolloverchain = [target, newintermediate, newroot, newrootrollover] |
75 oldtrusted = common.TrustAnchor(oldroot, constrained=False) | 75 oldtrusted = common.TrustAnchor(oldroot, constrained=False) |
76 | 76 |
77 newchain = [target, newintermediate] | 77 newchain = [target, newintermediate] |
78 newtrusted = common.TrustAnchor(newroot, constrained=False) | 78 newtrusted = common.TrustAnchor(newroot, constrained=False) |
79 | 79 |
80 time = common.DEFAULT_TIME | 80 time = common.DEFAULT_TIME |
81 verify_result = True | 81 verify_result = True |
| 82 errors = None |
82 | 83 |
83 common.write_test_file(__doc__, oldchain, oldtrusted, time, verify_result, | 84 common.write_test_file(__doc__, oldchain, oldtrusted, time, verify_result, |
84 out_pem="key-rollover-oldchain.pem") | 85 errors, out_pem="key-rollover-oldchain.pem") |
85 common.write_test_file(__doc__, rolloverchain, oldtrusted, time, verify_result, | 86 common.write_test_file(__doc__, rolloverchain, oldtrusted, time, verify_result, |
86 out_pem="key-rollover-rolloverchain.pem") | 87 errors, out_pem="key-rollover-rolloverchain.pem") |
87 common.write_test_file(__doc__, longrolloverchain, oldtrusted, time, | 88 common.write_test_file(__doc__, longrolloverchain, oldtrusted, time, |
88 verify_result, | 89 verify_result, errors, |
89 out_pem="key-rollover-longrolloverchain.pem") | 90 out_pem="key-rollover-longrolloverchain.pem") |
90 common.write_test_file(__doc__, newchain, newtrusted, time, verify_result, | 91 common.write_test_file(__doc__, newchain, newtrusted, time, verify_result, |
91 out_pem="key-rollover-newchain.pem") | 92 errors, out_pem="key-rollover-newchain.pem") |
92 | |
OLD | NEW |