| Index: net/data/verify_certificate_chain_unittest/generate-intermediary-lacks-basic-constraints.py | 
| diff --git a/net/data/verify_certificate_chain_unittest/generate-intermediary-lacks-basic-constraints.py b/net/data/verify_certificate_chain_unittest/generate-intermediary-lacks-basic-constraints.py | 
| new file mode 100755 | 
| index 0000000000000000000000000000000000000000..2c9b53484a012e9eb0b24c3337024d80b199ba72 | 
| --- /dev/null | 
| +++ b/net/data/verify_certificate_chain_unittest/generate-intermediary-lacks-basic-constraints.py | 
| @@ -0,0 +1,27 @@ | 
| +#!/usr/bin/python | 
| +# Copyright (c) 2015 The Chromium Authors. All rights reserved. | 
| +# Use of this source code is governed by a BSD-style license that can be | 
| +# found in the LICENSE file. | 
| + | 
| +"""Certificate chain with 1 intermediary and a trusted root. The intermediary | 
| +lacks the basic constraints extension, and hence is expected to fail validation | 
| +(RFC 5280 requires v3 signing certificates have a BasicConstaints).""" | 
| + | 
| +import common | 
| + | 
| +# Self-signed root certificate (part of trust store). | 
| +root = common.CreateSelfSignedRootCertificate('Root') | 
| + | 
| +# Intermediary that lacks basic constraints. | 
| +intermediary = common.CreateIntermediaryCertificate('Intermediary', root) | 
| +intermediary.GetExtensions().RemoveProperty('basicConstraints') | 
| + | 
| +# Target certificate. | 
| +target = common.CreateEndEntityCertificate('Target', intermediary) | 
| + | 
| +chain = [target, intermediary] | 
| +trusted = [root] | 
| +time = common.DEFAULT_TIME | 
| +verify_result = False | 
| + | 
| +common.WriteTestFile(__doc__, chain, trusted, time, verify_result) | 
|  |