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

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: rebase 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
« no previous file with comments | « content/renderer/webcrypto/webcrypto_impl.h ('k') | content/renderer/webcrypto/webcrypto_impl_nss.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/webcrypto/webcrypto_impl.cc
diff --git a/content/renderer/webcrypto/webcrypto_impl.cc b/content/renderer/webcrypto/webcrypto_impl.cc
index 2269030d0a3a3eaf4d1f445a42b8ed909b3f4490..4c4f3bf8d137975fb7517f17211666d05f06ef19 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(
+ blink::WebCryptoKeyFormat format,
+ const blink::WebCryptoKey& key,
+ blink::WebCryptoResult result) {
+ blink::WebArrayBuffer buffer;
+ if (!ExportKeyInternal(format, key, &buffer)) {
+ result.completeWithError();
+ return;
+ }
+ result.completeWithBuffer(buffer);
+}
+
void WebCryptoImpl::sign(
const blink::WebCryptoAlgorithm& algorithm,
const blink::WebCryptoKey& key,
« no previous file with comments | « content/renderer/webcrypto/webcrypto_impl.h ('k') | content/renderer/webcrypto/webcrypto_impl_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698