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

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

Issue 2923903002: Reject certificates that contain unknown policy qualifiers if the (Closed)
Patch Set: update ios files 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
(Empty)
1 #!/usr/bin/python
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
4 # found in the LICENSE file.
5
6 """The intermediate has a policies extension marked as critical, which contains
7 an unknown qualifer (1.2.3.4)."""
8
9 import sys
10 sys.path += ['..']
11
12 import common
13
14 # Self-signed root certificate (used as trust anchor).
15 root = common.create_self_signed_root_certificate('Root')
16
17 # Intermediate that has a critical policies extension containing an unknown
18 # policy qualifer.
19 intermediate = common.create_intermediate_certificate('Intermediate', root)
20 intermediate.get_extensions().add_property(
21 '2.5.29.32', ('critical,DER:30:13:30:11:06:02:2a:03:30:0b:30:09:06:03:'
22 '2a:03:04:0c:02:68:69'))
23
24 # Target certificate.
25 target = common.create_end_entity_certificate('Target', intermediate)
26
27 chain = [target, intermediate, root]
28 common.write_chain(__doc__, chain, 'chain.pem')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698