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

Unified Diff: chrome/test/data/extensions/api_test/enterprise_platform_keys/basic.js

Issue 306433003: enterprise.platformKeys: Support the publicExponent parameter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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: chrome/test/data/extensions/api_test/enterprise_platform_keys/basic.js
diff --git a/chrome/test/data/extensions/api_test/enterprise_platform_keys/basic.js b/chrome/test/data/extensions/api_test/enterprise_platform_keys/basic.js
index da0d2f189b2451b5c9892272b27c0c483b908639..c833c2ccecd21629edd264da5eef899a46c870bd 100644
--- a/chrome/test/data/extensions/api_test/enterprise_platform_keys/basic.js
+++ b/chrome/test/data/extensions/api_test/enterprise_platform_keys/basic.js
@@ -278,8 +278,8 @@ function runTests(userToken) {
name: "RSASSA-PKCS1-v1_5",
// RsaHashedKeyGenParams
modulusLength: 512,
- publicExponent:
- new Uint8Array([0x01, 0x00, 0x01]), // Equivalent to 65537
+ // Use some non-standard exponent. This one is equivalent to 257
+ publicExponent: new Uint8Array([0x01, 0x01]),
hash: {
name: "SHA-1",
}
@@ -309,17 +309,27 @@ function runTests(userToken) {
assertTrue(false, "Export failed: " + error);
})
.then(callbackPass(function(signature) {
+ var importParams = {
+ name: algorithm.name,
+ // RsaHashedImportParams
+ hash: {
+ name: "SHA-1",
+ }
+ };
assertTrue(!!signature, "No signature.");
assertTrue(signature.length != 0, "Signature is empty.");
cachedSignature = signature;
return window.crypto.subtle.importKey(
- "spki", cachedSpki, algorithm, false, ["verify"]);
+ "spki", cachedSpki, importParams, false, ["verify"]);
}),
function(error) { assertTrue(false, "Sign failed: " + error); })
.then(callbackPass(function(webCryptoPublicKey) {
assertTrue(!!webCryptoPublicKey);
assertEq(algorithm.modulusLength,
webCryptoPublicKey.algorithm.modulusLength);
+ console.log(algorithm.publicExponent);
+ assertEq(algorithm.publicExponent,
+ webCryptoPublicKey.algorithm.publicExponent);
return window.crypto.subtle.verify(
algorithm, webCryptoPublicKey, cachedSignature, data);
}),

Powered by Google App Engine
This is Rietveld 408576698