| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 newintermediate.set_key_path(oldintermediate.get_key_path()) | 65 newintermediate.set_key_path(oldintermediate.get_key_path()) |
| 66 newintermediate.set_validity_range(JANUARY_2_2015_UTC, | 66 newintermediate.set_validity_range(JANUARY_2_2015_UTC, |
| 67 common.JANUARY_1_2016_UTC) | 67 common.JANUARY_1_2016_UTC) |
| 68 | 68 |
| 69 # Target certificate. | 69 # Target certificate. |
| 70 target = common.create_end_entity_certificate('Target', oldintermediate) | 70 target = common.create_end_entity_certificate('Target', oldintermediate) |
| 71 | 71 |
| 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 = [oldroot] | 75 oldtrusted = common.TrustAnchor(oldroot, constrained=False) |
| 76 | 76 |
| 77 newchain = [target, newintermediate] | 77 newchain = [target, newintermediate] |
| 78 newtrusted = [newroot] | 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 | 82 |
| 83 common.write_test_file(__doc__, oldchain, oldtrusted, time, verify_result, | 83 common.write_test_file(__doc__, oldchain, oldtrusted, time, verify_result, |
| 84 out_pem="key-rollover-oldchain.pem") | 84 out_pem="key-rollover-oldchain.pem") |
| 85 common.write_test_file(__doc__, rolloverchain, oldtrusted, time, verify_result, | 85 common.write_test_file(__doc__, rolloverchain, oldtrusted, time, verify_result, |
| 86 out_pem="key-rollover-rolloverchain.pem") | 86 out_pem="key-rollover-rolloverchain.pem") |
| 87 common.write_test_file(__doc__, longrolloverchain, oldtrusted, time, | 87 common.write_test_file(__doc__, longrolloverchain, oldtrusted, time, |
| 88 verify_result, | 88 verify_result, |
| 89 out_pem="key-rollover-longrolloverchain.pem") | 89 out_pem="key-rollover-longrolloverchain.pem") |
| 90 common.write_test_file(__doc__, newchain, newtrusted, time, verify_result, | 90 common.write_test_file(__doc__, newchain, newtrusted, time, verify_result, |
| 91 out_pem="key-rollover-newchain.pem") | 91 out_pem="key-rollover-newchain.pem") |
| 92 | 92 |
| OLD | NEW |