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

Unified Diff: pkcs11_init.cc

Issue 6823012: cryptohome: Add stub functions to query PKCS11 set up status (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/cryptohome.git@master
Patch Set: word wrap Created 9 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 | « pkcs11_init.h ('k') | service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkcs11_init.cc
diff --git a/pkcs11_init.cc b/pkcs11_init.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5926729e13ca34f2889ab7434b493f5003eec1f5
--- /dev/null
+++ b/pkcs11_init.cc
@@ -0,0 +1,36 @@
+// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Contains the implementation of class Pkcs11Init
+
+#include "pkcs11_init.h"
+
+#include <iostream>
+
+#include <base/logging.h>
+#include <base/file_util.h>
+#include <base/string_util.h>
+#include <glib.h>
+#include <opencryptoki/pkcs11.h>
+
+#include "platform.h"
+
+namespace cryptohome {
+
+const CK_CHAR kDefaultUserPin[] = "111111";
+const CK_CHAR kDefaultLabel[] = "TPM";
+
+Pkcs11Init::Pkcs11Init() {
+}
+
+Pkcs11Init::~Pkcs11Init() {
+}
+
+void Pkcs11Init::GetTpmTokenInfo(gchar **OUT_label,
+ gchar **OUT_user_pin) {
+ *OUT_label = g_strdup(reinterpret_cast<const gchar *>(kDefaultLabel));
+ *OUT_user_pin = g_strdup(reinterpret_cast<const gchar *>(kDefaultUserPin));
+}
+
+} // namespace cryptohome
« no previous file with comments | « pkcs11_init.h ('k') | service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698