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

Unified Diff: nss_util.cc

Issue 6469072: [login_manager] Use keygen helper to generate owner key (Closed) Base URL: http://git.chromium.org/git/login_manager.git@master
Patch Set: Add a few constants Created 9 years, 10 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 | « nss_util.h ('k') | owner_key.h » ('j') | session_manager_service.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: nss_util.cc
diff --git a/nss_util.cc b/nss_util.cc
index 2ef55f0b138ce13854ce2127e1a40d92f7d192db..1f2f963f9ebd36e560c795881e6d1f9e087ed3ab 100644
--- a/nss_util.cc
+++ b/nss_util.cc
@@ -13,7 +13,6 @@
#include <base/nss_util.h>
#include <base/scoped_ptr.h>
#include <cros/chromeos_login.h>
-#include <glib/garray.h>
namespace login_manager {
///////////////////////////////////////////////////////////////////////////
@@ -67,11 +66,11 @@ NssUtil* NssUtil::Create() {
}
// static
-void NssUtil::KeyFromBuffer(const GArray* buf, std::vector<uint8>* out) {
- out->resize(buf->len);
- if (buf->len == 0)
+void NssUtil::KeyFromBuffer(const std::string& buf, std::vector<uint8>* out) {
+ out->resize(buf.length());
+ if (out->size() == 0)
return;
- memcpy(&(out->at(0)), buf->data, buf->len);
+ memcpy(&(out->at(0)), buf.c_str(), out->size());
}
// We're generating and using 2048-bit RSA keys.
« no previous file with comments | « nss_util.h ('k') | owner_key.h » ('j') | session_manager_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698