1 REM Copyright 2013 The Chromium Authors. All rights reserved.
\r
2 REM Use of this source code is governed by a BSD-style license that can be
\r
3 REM found in the LICENSE file.
\r
5 del /q certificates\*
\r
7 REM Create a Cert Authority.
\r
8 makecert -r -pe -n "CN=CertAuthority" -ss CA -sr CurrentUser ^
\r
9 -a sha256 -cy authority -sky signature ^
\r
10 -sv certificates\AuthorityCert.pvk certificates\AuthorityCert.cer
\r
12 REM Create a second Cert Authority (used to test cert pinning).
\r
13 makecert -r -pe -n "CN=OtherCertAuthority" -ss CA -sr CurrentUser ^
\r
14 -a sha256 -cy authority -sky signature ^
\r
15 -sv certificates\OtherAuthorityCert.pvk ^
\r
16 certificates\OtherAuthorityCert.cer
\r
18 REM Create a self-signed cert.
\r
19 makecert -r -pe -n "CN=SelfSigned" -ss CA -sr CurrentUser ^
\r
20 -a sha256 -cy authority -sky signature ^
\r
21 -sv certificates\SelfSigned.pvk certificates\SelfSigned.cer
\r
23 pvk2pfx -pvk certificates\SelfSigned.pvk -spc certificates\SelfSigned.cer ^
\r
24 -pfx certificates\SelfSigned.pfx
\r
26 signtool sign /v /f certificates\SelfSigned.pfx dlls\self_signed.dll
\r
28 REM Create a signing cert from our first CA, with proper company name.
\r
29 makecert -pe -n "CN=Google Inc, OU=Chrome Testers" -a sha256 -cy end ^
\r
31 -ic certificates\AuthorityCert.cer -iv certificates\AuthorityCert.pvk ^
\r
32 -sv certificates\ValidCert.pvk certificates\ValidCert.cer
\r
34 pvk2pfx -pvk certificates\ValidCert.pvk -spc certificates\ValidCert.cer ^
\r
35 -pfx certificates\ValidCert.pfx
\r
37 signtool sign /v /f certificates\ValidCert.pfx dlls\valid_sig.dll
\r
39 REM Create a signing cert from our first CA, with wrong company name.
\r
40 makecert -pe -n "CN=NotGoogle Inc, OU=Chrome Testers" -a sha256 -cy end ^
\r
42 -ic certificates\AuthorityCert.cer -iv certificates\AuthorityCert.pvk ^
\r
43 -sv certificates\NotGoogleCert.pvk certificates\NotGoogleCert.cer
\r
45 pvk2pfx -pvk certificates\NotGoogleCert.pvk ^
\r
46 -spc certificates\NotGoogleCert.cer -pfx certificates\NotGoogleCert.pfx
\r
48 signtool sign /v /f certificates\NotGoogleCert.pfx dlls\not_google.dll
\r
50 REM Create a signing cert from the other CA.
\r
51 makecert -pe -n "CN=Google Inc, OU=Other Chrome Testers" -a sha256 -cy end ^
\r
53 -ic certificates\OtherAuthorityCert.cer ^
\r
54 -iv certificates\OtherAuthorityCert.pvk ^
\r
55 -sv certificates\DifferentHash.pvk certificates\DifferentHash.cer
\r
57 pvk2pfx -pvk certificates\DifferentHash.pvk ^
\r
58 -spc certificates\DifferentHash.cer -pfx certificates\DifferentHash.pfx
\r
60 signtool sign /v /f certificates\DifferentHash.pfx dlls\different_hash.dll
\r
62 REM Create an expired signing cert from our first CA.
\r
63 makecert -pe -n "CN=Google Inc, OU=Chrome Testers" -a sha256 -cy end ^
\r
65 -ic certificates\AuthorityCert.cer -iv certificates\AuthorityCert.pvk ^
\r
67 -sv certificates\ExpiredCert.pvk certificates\ExpiredCert.cer
\r
69 pvk2pfx -pvk certificates\ExpiredCert.pvk -spc certificates\ExpiredCert.cer ^
\r
70 -pfx certificates\ExpiredCert.pfx
\r
72 signtool sign /v /f certificates\ExpiredCert.pfx dlls\expired.dll
\r
74 del /q certificates\*.pvk
\r
75 del /q certificates\*.pfx
\r