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

Unified Diff: LayoutTests/crypto/subtle/ecdsa-sign-verify.html

Issue 957713004: [WebCrypto] Split LayoutTests/crypto/subtle into per-algorithm directories (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated to latest master Created 5 years, 10 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: LayoutTests/crypto/subtle/ecdsa-sign-verify.html
diff --git a/LayoutTests/crypto/subtle/ecdsa-sign-verify.html b/LayoutTests/crypto/subtle/ecdsa-sign-verify.html
deleted file mode 100644
index 10ed7d5bf34b27464f5876a23972ec9210dc1574..0000000000000000000000000000000000000000
--- a/LayoutTests/crypto/subtle/ecdsa-sign-verify.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="../../resources/js-test.js"></script>
-<script src="resources/common.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-
-<script>
-description("Test importing an EC key for ECDSA.");
-
-jsTestIsAsync = true;
-
-var extractable = true;
-
-var publicKeyJSON = {
- "kty": "EC",
- "crv": "P-256",
- "x": "fBEMZtz9qAf25p5F3bPHT2mhSE0gPo3Frajpqd18s8c",
- "y": "DfRImG5RveXRV2-ZkB-cLGqAakf9kHZDpyuDVZfvyMY"
-};
-
-var privateKeyJSON = {
- "kty": "EC",
- "crv": "P-256",
- "d": "H-M5UMX0YRJK6ZLCvf3xxzsWFfVxvVZ-YNGaofSM30I",
- "x": "fBEMZtz9qAf25p5F3bPHT2mhSE0gPo3Frajpqd18s8c",
- "y": "DfRImG5RveXRV2-ZkB-cLGqAakf9kHZDpyuDVZfvyMY"
-};
-
-var data = asciiToUint8Array("Hello, world!");
-
-debug("Importing a public key...");
-crypto.subtle.importKey("jwk", publicKeyJSON, { name: "ECDSA", namedCurve: "P-256" }, extractable, ["verify"]).then(function(result) {
- publicKey = result;
- debug("\nImporting a private key...");
- return crypto.subtle.importKey("jwk", privateKeyJSON, { name: "ECDSA", namedCurve: "P-256" }, extractable, ["sign"]);
-}).then(function(result) {
- privateKey = result;
- debug("\nSigning some text...");
- return crypto.subtle.sign({ name: "ECDSA", hash: { name: "SHA-1" } }, privateKey, data);
-}).then(function(result) {
- signature = result;
-
- debug("\nVerifying the signature...");
- return crypto.subtle.verify({ name: "ECDSA", hash: { name: "SHA-1" } }, publicKey, signature, data);
-}).then(function(result) {
- verificationResult = result;
- shouldBe("verificationResult", "true");
- debug("\nVerifying a bad signature...");
- return crypto.subtle.verify({ name: "ECDSA", hash: { name: "SHA-1" } }, publicKey, new Uint8Array(256), data);
-}).then(function(result) {
- verificationResult = result;
- shouldBe("verificationResult", "false");
-}).then(finishJSTest, failAndFinishJSTest);
-</script>
-
-</body>
-</html>
« no previous file with comments | « LayoutTests/crypto/subtle/ecdsa-import-jwk-expected.txt ('k') | LayoutTests/crypto/subtle/ecdsa-sign-verify-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698