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

Unified Diff: content/renderer/webcrypto/webcrypto_impl.cc

Issue 62633004: [webcrypto] Add RSA public key SPKI import/export for NSS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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: content/renderer/webcrypto/webcrypto_impl.cc
diff --git a/content/renderer/webcrypto/webcrypto_impl.cc b/content/renderer/webcrypto/webcrypto_impl.cc
index 38dc7729f87e796ef1dc19c60d2ace7dcfd7fb10..173a6fddf64d65e02c9e9c368221978609f07398 100644
--- a/content/renderer/webcrypto/webcrypto_impl.cc
+++ b/content/renderer/webcrypto/webcrypto_impl.cc
@@ -156,6 +156,18 @@ void WebCryptoImpl::importKey(
result.completeWithKey(key);
}
+void WebCryptoImpl::exportKey(
+ WebKit::WebCryptoKeyFormat format,
+ const WebKit::WebCryptoKey& key,
+ WebKit::WebCryptoResult result) {
+ WebKit::WebArrayBuffer buffer;
+ if (!ExportKeyInternal(format, key, &buffer)) {
+ result.completeWithError();
+ return;
+ }
+ result.completeWithBuffer(buffer);
+}
+
void WebCryptoImpl::sign(
const WebKit::WebCryptoAlgorithm& algorithm,
const WebKit::WebCryptoKey& key,

Powered by Google App Engine
This is Rietveld 408576698