OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2016 The Chromium Authors. All rights reserved. | 2 # Copyright 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 """Certificates for testing issuer lookup. | 6 """Certificates for testing issuer lookup. |
7 | 7 |
8 Root | 8 Root |
9 /| | | 9 /| | |
10 / | | | 10 / | | |
(...skipping 29 matching lines...) Expand all Loading... |
40 "Refer to generator script docstring for details.\n%s" % ( | 40 "Refer to generator script docstring for details.\n%s" % ( |
41 sys.argv[0], cert.get_cert_pem()), | 41 sys.argv[0], cert.get_cert_pem()), |
42 filename) | 42 filename) |
43 | 43 |
44 | 44 |
45 # Self-signed root certificate | 45 # Self-signed root certificate |
46 root = common.create_self_signed_root_certificate('Root') | 46 root = common.create_self_signed_root_certificate('Root') |
47 write_cert_to_file(root, 'root.pem') | 47 write_cert_to_file(root, 'root.pem') |
48 | 48 |
49 | 49 |
50 # Intermediary certificates | 50 # Intermediate certificates |
51 i1_1 = common.create_intermediary_certificate('I1', root) | 51 i1_1 = common.create_intermediate_certificate('I1', root) |
52 write_cert_to_file(i1_1, 'i1_1.pem') | 52 write_cert_to_file(i1_1, 'i1_1.pem') |
53 | 53 |
54 # same name (after normalization), different key | 54 # same name (after normalization), different key |
55 i1_2 = common.create_intermediary_certificate('i1', root) | 55 i1_2 = common.create_intermediate_certificate('i1', root) |
56 write_cert_to_file(i1_2, 'i1_2.pem') | 56 write_cert_to_file(i1_2, 'i1_2.pem') |
57 | 57 |
58 # different name | 58 # different name |
59 i2 = common.create_intermediary_certificate('I2', root) | 59 i2 = common.create_intermediate_certificate('I2', root) |
60 write_cert_to_file(i2, 'i2.pem') | 60 write_cert_to_file(i2, 'i2.pem') |
61 | 61 |
62 | 62 |
63 # target certs | 63 # target certs |
64 | 64 |
65 c1 = common.create_end_entity_certificate('C1', i1_1) | 65 c1 = common.create_end_entity_certificate('C1', i1_1) |
66 write_cert_to_file(c1, 'c1.pem') | 66 write_cert_to_file(c1, 'c1.pem') |
67 | 67 |
68 c2 = common.create_end_entity_certificate('C2', i1_2) | 68 c2 = common.create_end_entity_certificate('C2', i1_2) |
69 write_cert_to_file(c2, 'c2.pem') | 69 write_cert_to_file(c2, 'c2.pem') |
70 | 70 |
71 d = common.create_end_entity_certificate('D', i2) | 71 d = common.create_end_entity_certificate('D', i2) |
72 write_cert_to_file(d, 'd.pem') | 72 write_cert_to_file(d, 'd.pem') |
73 | 73 |
74 | 74 |
OLD | NEW |