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

Side by Side Diff: net/data/ssl/scripts/generate-android-test-keys.sh

Issue 2390493002: Tidy up ssl_platform_key_android_unittest.cc. (Closed)
Patch Set: Regenerate CrOS data Created 4 years, 2 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 #!/bin/sh
2
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.
6
7 # This script is used to generate the test keys for the unit test in
8 # android/keystore_unittest.c.
9 #
10 # These are test RSA / DSA / ECDSA private keys in PKCS#8 format, as well
11 # as the corresponding DSA / ECDSA public keys.
12 #
13
14 # Exit script as soon a something fails.
15 set -e
16
17 mkdir -p out
18 rm -rf out/*
19
20 # Generate a single 2048-bits RSA private key in PKCS#8 format.
21 KEY=android-test-key-rsa
22 openssl genrsa \
23 -out out/$KEY.pem \
24 2048
25
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
29 openssl dsaparam \
30 -out out/$KEY.param.pem \
31 2048
32
33 openssl gendsa \
34 -out out/$KEY.pem \
35 out/$KEY.param.pem
36
37 openssl dsa \
38 -in out/$KEY.pem \
39 -outform PEM \
40 -out out/$KEY-public.pem \
41 -pubout
42
43 rm out/$KEY.param.pem
44
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
49
50 openssl ec \
51 -in out/$KEY.pem \
52 -outform PEM \
53 -out out/$KEY-public.pem \
54 -pubout
55
56 # We're done here.
OLDNEW
« no previous file with comments | « net/data/ssl/certificates/client_root_ca.pem ('k') | net/data/ssl/scripts/generate-client-certificates.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698