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

Side by Side Diff: chrome/test/data/extensions/api_test/platform_keys/basic.js

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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/platform_keys/client_1.der » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 'use strict'; 5 'use strict';
6 6
7 var systemTokenEnabled = (location.search.indexOf("systemTokenEnabled") != -1); 7 var systemTokenEnabled = (location.search.indexOf("systemTokenEnabled") != -1);
8 var selectedTestSuite = location.hash.slice(1); 8 var selectedTestSuite = location.hash.slice(1);
9 console.log('[SELECTED TEST SUITE] ' + selectedTestSuite + 9 console.log('[SELECTED TEST SUITE] ' + selectedTestSuite +
10 ', systemTokenEnable ' + systemTokenEnabled); 10 ', systemTokenEnable ' + systemTokenEnabled);
(...skipping 18 matching lines...) Expand all
29 // which is set to be trusted by the test setup. 29 // which is set to be trusted by the test setup.
30 // Generated by create_test_certs.sh . 30 // Generated by create_test_certs.sh .
31 trusted_l1_interm_cert: 'l1_interm.der', 31 trusted_l1_interm_cert: 'l1_interm.der',
32 32
33 // X.509 certificate in DER encoding issued by 'l1_interm'. 33 // X.509 certificate in DER encoding issued by 'l1_interm'.
34 // Generated by create_test_certs.sh . 34 // Generated by create_test_certs.sh .
35 trusted_l2_leaf_cert: 'l2_leaf.der', 35 trusted_l2_leaf_cert: 'l2_leaf.der',
36 36
37 // X.509 client certificate in DER encoding. 37 // X.509 client certificate in DER encoding.
38 // Algorithm in SPKI: rsaEncryption. 38 // Algorithm in SPKI: rsaEncryption.
39 // openssl x509 -in net/data/ssl/certificates/client_1.pem -outform DER -out 39 // Generated by create_net_cert_data.sh .
40 // client_1.der
41 client_1: 'client_1.der', 40 client_1: 'client_1.der',
42 41
43 // X.509 client certificate in DER encoding. 42 // X.509 client certificate in DER encoding.
44 // Algorithm in SPKI: rsaEncryption. 43 // Algorithm in SPKI: rsaEncryption.
45 // openssl x509 -in net/data/ssl/certificates/client_2.pem -outform DER -out 44 // Generated by create_net_cert_data.sh .
46 // client_2.der
47 client_2: 'client_2.der', 45 client_2: 'client_2.der',
48 46
49 // The public key of client_1 as Subject Public Key Info in DER encoding. 47 // The public key of client_1 as Subject Public Key Info in DER encoding.
50 // openssl rsa -in net/data/ssl/certificates/client_1.key -inform PEM -out 48 // Generated by create_net_cert_data.sh .
51 // pubkey.der -pubout -outform DER
52 client_1_spki: 'client_1_spki.der', 49 client_1_spki: 'client_1_spki.der',
53 50
54 // The distinguished name of the CA that issued client_1 in DER encoding. 51 // The distinguished name of the CA that issued client_1 in DER encoding.
55 // openssl asn1parse -in client_1.der -inform DER -strparse 32 -out 52 // Generated by create_net_cert_data.sh .
56 // client_1_issuer_dn.der
57 client_1_issuer_dn: 'client_1_issuer_dn.der', 53 client_1_issuer_dn: 'client_1_issuer_dn.der',
58 54
59 // echo -n "hello world" > data 55 // The string "hello world".
56 // Generated by create_net_cert_data.sh .
60 raw_data: 'data', 57 raw_data: 'data',
61 58
62 // openssl rsautl -inkey net/data/ssl/certificates/client_1.key -sign -in 59 // A signature of raw_data using RSASSA-PKCS1-v1_5 with client_1, but treating
63 // data -pkcs -out signature_nohash_pkcs 60 // raw_data as a raw digest and without adding the DigestInfo prefix.
61 // Generated by create_net_cert_data.sh .
64 signature_nohash_pkcs: 'signature_nohash_pkcs', 62 signature_nohash_pkcs: 'signature_nohash_pkcs',
65 63
66 // openssl dgst -sha1 -sign net/data/ssl/certificates/client_1.key 64 // A signature of raw_data using RSASSA-PKCS1-v1_5 with client_1, using SHA-1
67 // -out signature_sha1_pkcs data 65 // as the hash function.
66 // Generated by create_net_cert_data.sh .
68 signature_sha1_pkcs: 'signature_sha1_pkcs', 67 signature_sha1_pkcs: 'signature_sha1_pkcs',
69 }; 68 };
70 69
71 // Reads the binary file at |path| and passes it as a Uin8Array to |callback|. 70 // Reads the binary file at |path| and passes it as a Uint8Array to |callback|.
72 function readFile(path, callback) { 71 function readFile(path, callback) {
73 var oReq = new XMLHttpRequest(); 72 var oReq = new XMLHttpRequest();
74 oReq.responseType = "arraybuffer"; 73 oReq.responseType = "arraybuffer";
75 oReq.open("GET", path, true /* asynchronous */); 74 oReq.open("GET", path, true /* asynchronous */);
76 oReq.onload = function() { 75 oReq.onload = function() {
77 var arrayBuffer = oReq.response; 76 var arrayBuffer = oReq.response;
78 if (arrayBuffer) { 77 if (arrayBuffer) {
79 callback(new Uint8Array(arrayBuffer)); 78 callback(new Uint8Array(arrayBuffer));
80 } else { 79 } else {
81 callback(null); 80 callback(null);
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 // Interactive selection must not prompt the user and not return any 648 // Interactive selection must not prompt the user and not return any
650 // certificate. 649 // certificate.
651 testInteractiveSelectNoCerts, 650 testInteractiveSelectNoCerts,
652 ]; 651 ];
653 chrome.test.runTests(tests); 652 chrome.test.runTests(tests);
654 }, 653 },
655 654
656 }; 655 };
657 656
658 setUp(testSuites[selectedTestSuite]); 657 setUp(testSuites[selectedTestSuite]);
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/platform_keys/client_1.der » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698