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

Side by Side Diff: net/data/verify_certificate_chain_unittest/unknown-non-critical-policy-qualifier/generate-chains.py

Issue 2951403002: Update comments for net/data/verify_certificate_chain_unittest/ (Closed)
Patch Set: Created 3 years, 5 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 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2015 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2015 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 """The intermediate has a policies extension (not marked as critical), 6 """Certificate chain where the intermediate has a policies extension (not
7 which contains an unknown qualifer (1.2.3.4).""" 7 marked as critical) which contains an unknown policy qualifer (1.2.3.4)."""
8 8
9 import sys 9 import sys
10 sys.path += ['..'] 10 sys.path += ['..']
11 11
12 import common 12 import common
13 13
14 # Self-signed root certificate (used as trust anchor). 14 # Self-signed root certificate.
15 root = common.create_self_signed_root_certificate('Root') 15 root = common.create_self_signed_root_certificate('Root')
16 16
17 # Intermediate that has a non-critical policies extension containing an unknown 17 # Intermediate that has a non-critical policies extension containing an unknown
18 # policy qualifer. 18 # policy qualifer.
19 intermediate = common.create_intermediate_certificate('Intermediate', root) 19 intermediate = common.create_intermediate_certificate('Intermediate', root)
20 intermediate.get_extensions().add_property( 20 intermediate.get_extensions().add_property(
21 '2.5.29.32', ('DER:30:13:30:11:06:02:2a:03:30:0b:30:09:06:03:' 21 '2.5.29.32', ('DER:30:13:30:11:06:02:2a:03:30:0b:30:09:06:03:'
22 '2a:03:04:0c:02:68:69')) 22 '2a:03:04:0c:02:68:69'))
23 23
24 # Target certificate. 24 # Target certificate.
25 target = common.create_end_entity_certificate('Target', intermediate) 25 target = common.create_end_entity_certificate('Target', intermediate)
26 26
27 chain = [target, intermediate, root] 27 chain = [target, intermediate, root]
28 common.write_chain(__doc__, chain, 'chain.pem') 28 common.write_chain(__doc__, chain, 'chain.pem')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698