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

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

Issue 1286793002: Treat failure to parse certificates as SSL protocol errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: and now with more keys Created 5 years, 4 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
« no previous file with comments | « net/data/ssl/certificates/bad_validity.pem ('k') | net/socket/ssl_client_socket_nss.cc » ('j') | 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 92d8f22868b191eeab7860a28e75f3ea09dba9f4..feb24532b4d325bd34941501c9fe08d389d6754b 100755
--- a/net/data/ssl/scripts/generate-test-certs.sh
+++ b/net/data/ssl/scripts/generate-test-certs.sh
@@ -107,6 +107,17 @@ CA_COMMON_NAME="Test Root CA" \
-out out/localhost_cert.pem \
-config ca.cnf
+CA_COMMON_NAME="Test Root CA" \
+ try openssl ca \
+ -batch \
+ -extensions user_cert \
+ -subj "/CN=Leaf Certificate/" \
+ -startdate 00010101000000Z \
+ -enddate 00010101000000Z \
+ -in out/ok_cert.req \
+ -out out/bad_validity.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 \
@@ -119,6 +130,8 @@ try /bin/sh -c "cat out/ok_cert.key out/name_constraint_bad.pem \
> ../certificates/name_constraint_bad.pem"
try /bin/sh -c "cat out/ok_cert.key out/name_constraint_good.pem \
> ../certificates/name_constraint_good.pem"
+try /bin/sh -c "cat out/ok_cert.key out/bad_validity.pem \
+ > ../certificates/bad_validity.pem"
# Now generate the one-off certs
## SHA-256 general test cert
« no previous file with comments | « net/data/ssl/certificates/bad_validity.pem ('k') | net/socket/ssl_client_socket_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698