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

Unified Diff: content/child/webcrypto/shared_crypto.cc

Issue 203753009: [webcrypto] Add PKCS#8 export for RSA private keys for NSS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 9 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: content/child/webcrypto/shared_crypto.cc
diff --git a/content/child/webcrypto/shared_crypto.cc b/content/child/webcrypto/shared_crypto.cc
index c5b116e5eac5bfa8a7c22b06a67a9747f4c0c0fb..af2beaca2a672fbbca28886ed65115dfb49e5112 100644
--- a/content/child/webcrypto/shared_crypto.cc
+++ b/content/child/webcrypto/shared_crypto.cc
@@ -646,11 +646,15 @@ Status ExportKeyDontCheckExtractability(blink::WebCryptoKeyFormat format,
return status;
return platform::ExportKeySpki(public_key, buffer);
}
+ case blink::WebCryptoKeyFormatPkcs8: {
+ platform::PrivateKey* private_key;
+ Status status = ToPlatformPrivateKey(key, &private_key);
+ if (status.IsError())
+ return status;
+ return platform::ExportKeyPkcs8(private_key, key.algorithm(), buffer);
+ }
case blink::WebCryptoKeyFormatJwk:
return ExportKeyJwk(key, buffer);
- case blink::WebCryptoKeyFormatPkcs8:
- // TODO(eroman):
- return Status::ErrorUnsupported();
default:
return Status::ErrorUnsupported();
}
« no previous file with comments | « content/child/webcrypto/platform_crypto_openssl.cc ('k') | content/child/webcrypto/shared_crypto_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698