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

Unified Diff: net/data/ssl/scripts/generate-test-certs.sh

Issue 1554793002: Add a new test certificate for *.example.org as wildcard.pem (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix README Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/data/ssl/scripts/ee.cnf ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/data/ssl/scripts/generate-test-certs.sh
diff --git a/net/data/ssl/scripts/generate-test-certs.sh b/net/data/ssl/scripts/generate-test-certs.sh
index adf97ba9009400880231c06a98fc6c56e5c2b584..13586531b8ced4617ec6c0205329b59b4743d6cc 100755
--- a/net/data/ssl/scripts/generate-test-certs.sh
+++ b/net/data/ssl/scripts/generate-test-certs.sh
@@ -50,6 +50,13 @@ try openssl req \
-out out/ok_cert.req \
-config ee.cnf
+try openssl req \
+ -new \
+ -keyout out/wildcard.key \
+ -out out/wildcard.req \
+ -reqexts req_wildcard \
+ -config ee.cnf
+
SUBJECT_NAME=req_localhost_cn \
try openssl req \
-new \
@@ -81,6 +88,15 @@ CA_COMMON_NAME="Test Root CA" \
CA_COMMON_NAME="Test Root CA" \
try openssl ca \
-batch \
+ -extensions user_cert \
+ -days 3650 \
+ -in out/wildcard.req \
+ -out out/wildcard.pem \
+ -config ca.cnf
+
+CA_COMMON_NAME="Test Root CA" \
+ try openssl ca \
+ -batch \
-extensions name_constraint_bad \
-subj "/CN=Leaf certificate/" \
-days 3650 \
@@ -120,6 +136,8 @@ CA_COMMON_NAME="Test Root CA" \
try /bin/sh -c "cat out/ok_cert.key out/ok_cert.pem \
> ../certificates/ok_cert.pem"
+try /bin/sh -c "cat out/wildcard.key out/wildcard.pem \
+ > ../certificates/wildcard.pem"
try /bin/sh -c "cat out/localhost_cert.key out/localhost_cert.pem \
> ../certificates/localhost_cert.pem"
try /bin/sh -c "cat out/expired_cert.key out/expired_cert.pem \
« no previous file with comments | « net/data/ssl/scripts/ee.cnf ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698