3 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
7 # This script is used to generate the test keys for the unit test in
8 # android/keystore_unittest.c.
10 # These are test RSA / DSA / ECDSA private keys in PKCS#8 format, as well
11 # as the corresponding DSA / ECDSA public keys.
14 # Exit script as soon a something fails.
20 # Generate a single 2048-bits RSA private key in PKCS#8 format.
21 KEY
=android-test-key-rsa
26 # Generate a 2048-bits DSA private key in PKCS#8 format,
27 # as well as its public key in X.509 DER format.
28 KEY
=android-test-key-dsa
30 -out out
/$KEY.param.pem \
40 -out out
/$KEY-public.pem \
45 # Generate an ECDSA private key, in PKCS#8 format,
46 # as well as its public key in X.509 DER format.
47 KEY
=android-test-key-ecdsa
48 openssl ecparam
-genkey -name prime256v1
-out out
/$KEY.pem
53 -out out
/$KEY-public.pem \