Index: content/child/webcrypto/shared_crypto.cc |
diff --git a/content/child/webcrypto/shared_crypto.cc b/content/child/webcrypto/shared_crypto.cc |
index 63af5768b33c756b31bdcb4082716135b460ac3e..4ef57157236a8eeedff1f1c452698f5c68b85371 100644 |
--- a/content/child/webcrypto/shared_crypto.cc |
+++ b/content/child/webcrypto/shared_crypto.cc |
@@ -607,11 +607,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(); |
} |