Index: google_apis/cup/client_update_protocol_openssl.cc |
=================================================================== |
--- google_apis/cup/client_update_protocol_openssl.cc (revision 0) |
+++ google_apis/cup/client_update_protocol_openssl.cc (revision 0) |
@@ -0,0 +1,58 @@ |
+ |
+// Copyright (c) 2013 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 "google_apis/cup/client_update_protocol.h" |
+ |
+#include "base/logging.h" |
+ |
+class OpenSSLCupKeyImpl : public ClientUpdateProtocol::CupKeyImpl { |
+ public: |
+ OpenSSLCupKeyImpl(); |
+ virtual ~OpenSSLCupKeyImpl(); |
+ |
+ virtual size_t PublicKeyLength() const OVERRIDE; |
+ virtual std::vector<uint8> EncryptKeySource( |
+ const std::vector<uint8>& key_source) OVERRIDE; |
+ |
+ bool LoadPublicKey(const base::StringPiece& public_key); |
+}; |
+ |
+OpenSSLCupKeyImpl::OpenSSLCupKeyImpl() { |
+ NOTIMPLEMENTED(); |
+} |
+ |
+OpenSSLCupKeyImpl::~OpenSSLCupKeyImpl() { |
+ NOTIMPLEMENTED(); |
+} |
+ |
+bool OpenSSLCupKeyImpl::LoadPublicKey( |
+ const base::StringPiece& public_key) { |
+ NOTIMPLEMENTED(); |
+ return false; |
+} |
+ |
+size_t OpenSSLCupKeyImpl::PublicKeyLength() const { |
+ NOTIMPLEMENTED(); |
+ return 0; |
+} |
+ |
+std::vector<uint8> OpenSSLCupKeyImpl::EncryptKeySource( |
+ const std::vector<uint8>& key_source) { |
+ NOTIMPLEMENTED(); |
+ return std::vector<uint8>(); |
+} |
+ |
+ClientUpdateProtocol::CupKeyImpl* ClientUpdateProtocol::GetCupKeyImpl( |
+ const base::StringPiece& public_key) { |
+ scoped_ptr<OpenSSLCupKeyImpl> result(new OpenSSLCupKeyImpl()); |
+ if (!result.get()) |
+ return NULL; |
+ |
+ if (!result->LoadPublicKey(public_key)) |
+ return NULL; |
+ |
+ return result.release(); |
+} |
+ |