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

Unified Diff: content/child/webcrypto/nss/key_nss.cc

Issue 1077273002: html_viewer: Move webcrypto to a place where html_viewer can use it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT Created 5 years, 8 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/nss/key_nss.h ('k') | content/child/webcrypto/nss/rsa_hashed_algorithm_nss.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/webcrypto/nss/key_nss.cc
diff --git a/content/child/webcrypto/nss/key_nss.cc b/content/child/webcrypto/nss/key_nss.cc
deleted file mode 100644
index 0887fe659eae969da86633f5bdd014914d3318d6..0000000000000000000000000000000000000000
--- a/content/child/webcrypto/nss/key_nss.cc
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/child/webcrypto/nss/key_nss.h"
-
-#include "content/child/webcrypto/crypto_data.h"
-#include "content/child/webcrypto/status.h"
-#include "content/child/webcrypto/webcrypto_util.h"
-
-namespace content {
-
-namespace webcrypto {
-
-KeyNss::KeyNss(const CryptoData& serialized_key_data)
- : serialized_key_data_(
- serialized_key_data.bytes(),
- serialized_key_data.bytes() + serialized_key_data.byte_length()) {
-}
-
-KeyNss::~KeyNss() {
-}
-
-SymKeyNss* KeyNss::AsSymKey() {
- return NULL;
-}
-
-PublicKeyNss* KeyNss::AsPublicKey() {
- return NULL;
-}
-
-PrivateKeyNss* KeyNss::AsPrivateKey() {
- return NULL;
-}
-
-SymKeyNss::~SymKeyNss() {
-}
-
-SymKeyNss* SymKeyNss::Cast(const blink::WebCryptoKey& key) {
- KeyNss* platform_key = reinterpret_cast<KeyNss*>(key.handle());
- return platform_key->AsSymKey();
-}
-
-SymKeyNss* SymKeyNss::AsSymKey() {
- return this;
-}
-
-SymKeyNss::SymKeyNss(crypto::ScopedPK11SymKey key,
- const CryptoData& raw_key_data)
- : KeyNss(raw_key_data), key_(key.Pass()) {
-}
-
-PublicKeyNss::~PublicKeyNss() {
-}
-
-PublicKeyNss* PublicKeyNss::Cast(const blink::WebCryptoKey& key) {
- KeyNss* platform_key = reinterpret_cast<KeyNss*>(key.handle());
- return platform_key->AsPublicKey();
-}
-
-PublicKeyNss* PublicKeyNss::AsPublicKey() {
- return this;
-}
-
-PublicKeyNss::PublicKeyNss(crypto::ScopedSECKEYPublicKey key,
- const CryptoData& spki_data)
- : KeyNss(spki_data), key_(key.Pass()) {
-}
-
-PrivateKeyNss::~PrivateKeyNss() {
-}
-
-PrivateKeyNss* PrivateKeyNss::Cast(const blink::WebCryptoKey& key) {
- KeyNss* platform_key = reinterpret_cast<KeyNss*>(key.handle());
- return platform_key->AsPrivateKey();
-}
-
-PrivateKeyNss* PrivateKeyNss::AsPrivateKey() {
- return this;
-}
-
-PrivateKeyNss::PrivateKeyNss(crypto::ScopedSECKEYPrivateKey key,
- const CryptoData& pkcs8_data)
- : KeyNss(pkcs8_data), key_(key.Pass()) {
-}
-
-} // namespace webcrypto
-
-} // namespace content
« no previous file with comments | « content/child/webcrypto/nss/key_nss.h ('k') | content/child/webcrypto/nss/rsa_hashed_algorithm_nss.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698