| Index: net/data/verify_certificate_chain_unittest/generate-target-signed-using-ecdsa.py
|
| diff --git a/net/data/verify_certificate_chain_unittest/generate-target-signed-using-ecdsa.py b/net/data/verify_certificate_chain_unittest/generate-target-signed-using-ecdsa.py
|
| new file mode 100755
|
| index 0000000000000000000000000000000000000000..4fe81ba7684c4a3c3c9ade9bc1eace725c5fe4bb
|
| --- /dev/null
|
| +++ b/net/data/verify_certificate_chain_unittest/generate-target-signed-using-ecdsa.py
|
| @@ -0,0 +1,26 @@
|
| +#!/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 a trusted root using RSA, and intermediary using EC,
|
| +and a target certificate using RSA. Verification is expected to succeed."""
|
| +
|
| +import common
|
| +
|
| +# Self-signed root certificate (part of trust store), using RSA.
|
| +root = common.CreateSelfSignedRootCertificate('Root')
|
| +
|
| +# Intermediary using an EC key for the P-384 curve.
|
| +intermediary = common.CreateIntermediaryCertificate('Intermediary', root)
|
| +intermediary.GenerateEcKey('secp384r1')
|
| +
|
| +# Target certificate contains an RSA key (but is signed using ECDSA).
|
| +target = common.CreateEndEntityCertificate('Target', intermediary)
|
| +
|
| +chain = [target, intermediary]
|
| +trusted = [root]
|
| +time = common.DEFAULT_TIME
|
| +verify_result = True
|
| +
|
| +common.WriteTestFile(__doc__, chain, trusted, time, verify_result)
|
|
|