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

Side by Side Diff: google_apis/cup/client_update_protocol_openssl.cc

Issue 15793005: Per discussion, implement the Omaha Client Update Protocol (CUP) in src/crypto. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1
2 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5
6 #include "google_apis/cup/client_update_protocol.h"
7
8 #include "base/logging.h"
9
10 class OpenSSLCupKeyImpl : public ClientUpdateProtocol::CupKeyImpl {
11 public:
12 OpenSSLCupKeyImpl();
13 virtual ~OpenSSLCupKeyImpl();
14
15 virtual size_t PublicKeyLength() const OVERRIDE;
16 virtual std::vector<uint8> EncryptKeySource(
17 const std::vector<uint8>& key_source) OVERRIDE;
18
19 bool LoadPublicKey(const base::StringPiece& public_key);
20 };
21
22 OpenSSLCupKeyImpl::OpenSSLCupKeyImpl() {
23 NOTIMPLEMENTED();
24 }
25
26 OpenSSLCupKeyImpl::~OpenSSLCupKeyImpl() {
27 NOTIMPLEMENTED();
28 }
29
30 bool OpenSSLCupKeyImpl::LoadPublicKey(
31 const base::StringPiece& public_key) {
32 NOTIMPLEMENTED();
33 return false;
34 }
35
36 size_t OpenSSLCupKeyImpl::PublicKeyLength() const {
37 NOTIMPLEMENTED();
38 return 0;
39 }
40
41 std::vector<uint8> OpenSSLCupKeyImpl::EncryptKeySource(
42 const std::vector<uint8>& key_source) {
43 NOTIMPLEMENTED();
44 return std::vector<uint8>();
45 }
46
47 ClientUpdateProtocol::CupKeyImpl* ClientUpdateProtocol::GetCupKeyImpl(
48 const base::StringPiece& public_key) {
49 scoped_ptr<OpenSSLCupKeyImpl> result(new OpenSSLCupKeyImpl());
50 if (!result.get())
51 return NULL;
52
53 if (!result->LoadPublicKey(public_key))
54 return NULL;
55
56 return result.release();
57 }
58
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698