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

Side by Side Diff: net/base/keygen_handler_win.cc

Issue 86913002: Make base::Base64Encode() return void (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: One more chromeos-specific fix. Created 7 years 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/base/keygen_handler.h" 5 #include "net/base/keygen_handler.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <wincrypt.h> 8 #include <wincrypt.h>
9 #pragma comment(lib, "crypt32.lib") 9 #pragma comment(lib, "crypt32.lib")
10 #include <rpc.h> 10 #include <rpc.h>
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 std::string spkac; 205 std::string spkac;
206 if (!GetSignedPublicKeyAndChallenge(key_container.provider_, challenge_, 206 if (!GetSignedPublicKeyAndChallenge(key_container.provider_, challenge_,
207 &spkac)) { 207 &spkac)) {
208 LOG(ERROR) << "Keygen failed: Couldn't generate the signed public key " 208 LOG(ERROR) << "Keygen failed: Couldn't generate the signed public key "
209 "and challenge"; 209 "and challenge";
210 return std::string(); 210 return std::string();
211 } 211 }
212 212
213 std::string result; 213 std::string result;
214 if (!base::Base64Encode(spkac, &result)) { 214 base::Base64Encode(spkac, &result);
215 LOG(ERROR) << "Keygen failed: Couldn't convert signed key into base64";
216 return std::string();
217 }
218 215
219 VLOG(1) << "Keygen succeeded"; 216 VLOG(1) << "Keygen succeeded";
220 return result; 217 return result;
221 } 218 }
222 } 219 }
223 220
224 } // namespace net 221 } // namespace net
OLDNEW
« no previous file with comments | « jingle/notifier/listener/push_notifications_send_update_task_unittest.cc ('k') | net/cert/x509_certificate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698