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

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

Issue 1059303002: 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: tweak |try| to retain exit code Created 5 years, 9 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-cross-signed-certs.sh
diff --git a/net/data/ssl/scripts/generate-cross-signed-certs.sh b/net/data/ssl/scripts/generate-cross-signed-certs.sh
index f5a7024911f928c36f3665c32b83e1e531db4178..610b4f1a4b8b613229093e43bef94cb6fad9c371 100755
--- a/net/data/ssl/scripts/generate-cross-signed-certs.sh
+++ b/net/data/ssl/scripts/generate-cross-signed-certs.sh
@@ -19,12 +19,7 @@
# MD5root, or leaf -> MD5root -> SHA256root
try() {
- echo "$@"
- "$@" || exit 1
-}
-
-quiet_try() {
- "$@" || exit 1
+ "$@" || (e=$?; echo "$@" > /dev/stderr && exit $e)
Ryan Sleevi 2015/04/04 00:35:24 bash-dog says "I have no idea what's this doing" (
estark 2015/04/04 00:40:18 So you like try/quiet_try better? My goal is to ca
Ryan Sleevi 2015/04/04 00:46:43 Oh, right, fair point. Mostly my comment was alte
palmer 2015/04/04 01:48:56 Yes, this is all standard POSIX shell syntax, no m
estark 2015/04/06 16:41:13 Done.
estark 2015/04/06 16:41:13 Done.
}
try rm -rf out
@@ -85,9 +80,9 @@ CA_COMMON_NAME="Test Dup-Hash Root CA" \
-out out/ok_cert.pem \
-config ca.cnf
-quiet_try openssl x509 -text \
+try openssl x509 -text \
-in out/2048-md5-root.pem > ../certificates/cross-signed-root-md5.pem
-quiet_try openssl x509 -text \
+try openssl x509 -text \
-in out/2048-sha256-root.pem > ../certificates/cross-signed-root-sha256.pem
-quiet_try openssl x509 -text \
+try openssl x509 -text \
-in out/ok_cert.pem > ../certificates/cross-signed-leaf.pem

Powered by Google App Engine
This is Rietveld 408576698