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

Unified Diff: content/child/webcrypto/openssl/key_openssl.cc

Issue 353043005: [webcrypto] Wire up {spki, pkcs8} import/export for OpenSSL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase onto master (which no longer has boringssl) Created 6 years, 5 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
« no previous file with comments | « content/child/webcrypto/openssl/key_openssl.h ('k') | content/child/webcrypto/openssl/rsa_key_openssl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « content/child/webcrypto/openssl/key_openssl.h ('k') | content/child/webcrypto/openssl/rsa_key_openssl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698