Index: Source/testing/runner/MockWebCrypto.cpp |
diff --git a/Source/testing/runner/MockWebCrypto.cpp b/Source/testing/runner/MockWebCrypto.cpp |
index 48e9a2209f7058e2ca53d6f47d613aa98d7f0a54..a0b48af7567f11da428ec0e56b098f12fd5f2f28 100644 |
--- a/Source/testing/runner/MockWebCrypto.cpp |
+++ b/Source/testing/runner/MockWebCrypto.cpp |
@@ -125,4 +125,17 @@ void MockWebCrypto::importKey(WebKit::WebCryptoKeyFormat, const unsigned char* k |
result.completeWithKey(WebKit::WebCryptoKey::create(0, type, extractable, algorithm, usages)); |
} |
+void MockWebCrypto::exportKey(WebKit::WebCryptoKeyFormat format, const WebKit::WebCryptoKey& key, WebKit::WebCryptoResult result) |
+{ |
+ std::string buffer; |
+ |
+ if (format == WebKit::WebCryptoKeyFormatRaw) |
+ buffer = "raw"; |
+ else if (format == WebKit::WebCryptoKeyFormatPkcs8) |
+ buffer = "pkcs8"; |
+ |
+ result.completeWithBuffer(buffer.data(), buffer.size()); |
+} |
+ |
+ |
} // namespace WebTestRunner |