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

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

Issue 1066613002: Revert of Don't process HSTS/HPKP headers when host is an IP address (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
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 b0fd908b9a3e80583e6f1b0d8cd79afe8b93345e..24eadf108552a1bde2e64fc6ecd8cc22a5d1d269 100755
--- a/net/data/ssl/scripts/generate-test-certs.sh
+++ b/net/data/ssl/scripts/generate-test-certs.sh
@@ -8,7 +8,8 @@
# certificates that can be used to test fetching of an intermediate via AIA.
try() {
- "$@" || (e=$?; echo "$@" > /dev/stderr; exit $e)
+ echo "$@"
+ "$@" || exit 1
}
try rm -rf out
@@ -32,10 +33,11 @@
try openssl x509 \
-req -days 3650 \
-in out/2048-sha256-root.req \
+ -out out/2048-sha256-root.pem \
-signkey out/2048-sha256-root.key \
-extfile ca.cnf \
-extensions ca_cert \
- -text > out/2048-sha256-root.pem
+ -text
# Generate the leaf certificate requests
try openssl req \
@@ -50,14 +52,6 @@
-out out/ok_cert.req \
-config ee.cnf
-SUBJECT_NAME=req_localhost_cn \
-try openssl req \
- -new \
- -keyout out/localhost_cert.key \
- -out out/localhost_cert.req \
- -reqexts req_localhost_san \
- -config ee.cnf
-
# Generate the leaf certificates
CA_COMMON_NAME="Test Root CA" \
try openssl ca \
@@ -98,19 +92,8 @@
-out out/name_constraint_good.pem \
-config ca.cnf
-CA_COMMON_NAME="Test Root CA" \
- try openssl ca \
- -batch \
- -extensions user_cert \
- -days 3650 \
- -in out/localhost_cert.req \
- -out out/localhost_cert.pem \
- -config ca.cnf
-
try /bin/sh -c "cat out/ok_cert.key out/ok_cert.pem \
> ../certificates/ok_cert.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 \
> ../certificates/expired_cert.pem"
try /bin/sh -c "cat out/2048-sha256-root.key out/2048-sha256-root.pem \
@@ -125,7 +108,7 @@
try openssl req -x509 -days 3650 \
-config ../scripts/ee.cnf -newkey rsa:2048 -text \
-sha256 \
- -out ../certificates/sha256.pem
+ -out sha256.pem
## Self-signed cert for SPDY/QUIC/HTTP2 pooling testing
try openssl req -x509 -days 3650 -extensions req_spdy_pooling \
« no previous file with comments | « net/data/ssl/scripts/generate-policy-certs.sh ('k') | net/data/url_request_unittest/hpkp-headers.html.mock-http-headers » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698