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

Unified Diff: chrome/test/data/extensions/api_test/platform_keys/create_net_cert_data.sh

Issue 2567523003: Fix P-521 client cert mapping and test all curves. (Closed)
Patch Set: reupload with hack to depot_tools Created 4 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
Index: chrome/test/data/extensions/api_test/platform_keys/create_net_cert_data.sh
diff --git a/chrome/test/data/extensions/api_test/platform_keys/create_net_cert_data.sh b/chrome/test/data/extensions/api_test/platform_keys/create_net_cert_data.sh
new file mode 100755
index 0000000000000000000000000000000000000000..45e87b6986c9d99c3c335450e9e409f604c69eee
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/platform_keys/create_net_cert_data.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Updates the files which depend on net/data/ssl/certificates.
+
+try() {
+ "$@" || {
+ e=$?
+ echo "*** ERROR $e *** $@ " > /dev/stderr
+ exit $e
+ }
+}
+
+net_certs_dir=../../../../../../net/data/ssl/certificates
+
+try openssl x509 -in "${net_certs_dir}/client_1.pem" -outform DER -out \
+ client_1.der
+try openssl x509 -in "${net_certs_dir}/client_2.pem" -outform DER -out \
+ client_2.der
+try openssl rsa -in "${net_certs_dir}/client_1.key" -inform PEM -out \
+ client_1_spki.der -pubout -outform DER
+try openssl asn1parse -in client_1.der -inform DER -strparse 32 -out \
+ client_1_issuer_dn.der
+try echo -n "hello world" > data
+try openssl rsautl -inkey "${net_certs_dir}/client_1.key" -sign -in \
+ data -pkcs -out signature_nohash_pkcs
+try openssl dgst -sha1 -sign "${net_certs_dir}/client_1.key" -out \
+ signature_sha1_pkcs data

Powered by Google App Engine
This is Rietveld 408576698