| Index: net/data/verify_certificate_chain_unittest/generate-intermediary-basic-constraints-not-critical.py
|
| diff --git a/net/data/verify_certificate_chain_unittest/generate-intermediary-basic-constraints-not-critical.py b/net/data/verify_certificate_chain_unittest/generate-intermediary-basic-constraints-not-critical.py
|
| new file mode 100755
|
| index 0000000000000000000000000000000000000000..863e39a1f3a103fa388c273d03a20f8b1cb033e0
|
| --- /dev/null
|
| +++ b/net/data/verify_certificate_chain_unittest/generate-intermediary-basic-constraints-not-critical.py
|
| @@ -0,0 +1,33 @@
|
| +#!/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.
|
| +
|
| +import os
|
| +import sys
|
| +
|
| +sys.path.insert(0, os.path.dirname(__file__))
|
| +import common
|
| +
|
| +description = """Simple certificate chain with 1 intermediary and a trusted
|
| +root. The intermediary has a basic constraints extension but does not mark it
|
| +as critical."""
|
| +
|
| +common.Init(__file__)
|
| +
|
| +# Self-signed root certificate (part of trust store).
|
| +root = common.CreateSelfSignedRootCertificate('Root')
|
| +
|
| +# Intermediary with non-critical basic constarints.
|
| +intermediary = common.CreateIntermediaryCertificate('Intermediary', root)
|
| +intermediary.GetExtensions().SetProperty('basicConstraints', 'CA:true')
|
| +
|
| +# Target certificate.
|
| +target = common.CreateEndEntityCertificate('Target', intermediary)
|
| +
|
| +chain = [target, intermediary]
|
| +trusted = [root]
|
| +time = common.DEFAULT_TIME
|
| +verify_result = True
|
| +
|
| +common.WriteTestFile(description, chain, trusted, time, verify_result)
|
|
|