Index: content/child/webcrypto/openssl/key_openssl.cc |
diff --git a/content/child/webcrypto/openssl/key_openssl.cc b/content/child/webcrypto/openssl/key_openssl.cc |
index 5670d6bae625c441adb5a00b6eb0a7e7252d1a77..9ea1f20428cf45fcbcf692b7a550b5dd502fa497 100644 |
--- a/content/child/webcrypto/openssl/key_openssl.cc |
+++ b/content/child/webcrypto/openssl/key_openssl.cc |
@@ -25,6 +25,10 @@ SymKeyOpenSsl* KeyOpenSsl::AsSymKey() { |
return NULL; |
} |
+AsymKeyOpenSsl* KeyOpenSsl::AsAsymKey() { |
+ return NULL; |
+} |
+ |
SymKeyOpenSsl::~SymKeyOpenSsl() { |
} |
@@ -41,6 +45,22 @@ SymKeyOpenSsl::SymKeyOpenSsl(const CryptoData& raw_key_data) |
: KeyOpenSsl(raw_key_data) { |
} |
+AsymKeyOpenSsl::~AsymKeyOpenSsl() { |
+} |
+ |
+AsymKeyOpenSsl* AsymKeyOpenSsl::Cast(const blink::WebCryptoKey& key) { |
+ return reinterpret_cast<KeyOpenSsl*>(key.handle())->AsAsymKey(); |
+} |
+ |
+AsymKeyOpenSsl* AsymKeyOpenSsl::AsAsymKey() { |
+ return this; |
+} |
+ |
+AsymKeyOpenSsl::AsymKeyOpenSsl(crypto::ScopedEVP_PKEY key, |
+ const CryptoData& serialized_key_data) |
+ : KeyOpenSsl(serialized_key_data), key_(key.Pass()) { |
+} |
+ |
bool PlatformSerializeKeyForClone(const blink::WebCryptoKey& key, |
blink::WebVector<uint8_t>* key_data) { |
const KeyOpenSsl* openssl_key = static_cast<KeyOpenSsl*>(key.handle()); |