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

Side by Side Diff: net/data/verify_certificate_chain_unittest/target-serverauth-various-keyusages/generate-chains.py

Issue 2951403002: Update comments for net/data/verify_certificate_chain_unittest/ (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 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2017 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2017 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 """Generates a variety of chains where the target certificate varies in its key 6 """Generates a variety of chains where the target certificate varies in its key
7 type and key usages.""" 7 type and key usages."""
8 8
9 import sys 9 import sys
10 sys.path += ['..'] 10 sys.path += ['..']
(...skipping 29 matching lines...) Expand all
40 target = common.create_end_entity_certificate('Target', intermediate) 40 target = common.create_end_entity_certificate('Target', intermediate)
41 target.get_extensions().set_property('extendedKeyUsage', 'serverAuth') 41 target.get_extensions().set_property('extendedKeyUsage', 'serverAuth')
42 target.get_extensions().set_property('keyUsage', 42 target.get_extensions().set_property('keyUsage',
43 'critical,%s' % (key_usage)) 43 'critical,%s' % (key_usage))
44 44
45 # Set the key. 45 # Set the key.
46 target.set_key(KEYS[key_type]) 46 target.set_key(KEYS[key_type])
47 47
48 # Write the chain. 48 # Write the chain.
49 chain = [target, intermediate, root] 49 chain = [target, intermediate, root]
50 description = ('Certificate chain where the target uses a %s key and has ' 50 description = ('Certificate chain where the target certificate uses a %s '
51 'the single key usage %s') % (key_type.upper(), key_usage) 51 'key and has the single key usage %s') % (key_type.upper(),
52 key_usage)
52 common.write_chain(description, chain, '%s-%s.pem' % (key_type, key_usage)) 53 common.write_chain(description, chain, '%s-%s.pem' % (key_type, key_usage))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698