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

Unified Diff: net/base/pk11_slot_nss.cc

Issue 5686002: NSS: PKCS 11 password prompt. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 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 side-by-side diff with in-line comments
Download patch
Index: net/base/pk11_slot_nss.cc
diff --git a/net/base/pk11_slot_nss.cc b/net/base/pk11_slot_nss.cc
new file mode 100644
index 0000000000000000000000000000000000000000..3611ee477c8eacdca54ed3598360700da5544883
--- /dev/null
+++ b/net/base/pk11_slot_nss.cc
@@ -0,0 +1,28 @@
+// Copyright (c) 2010 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 "net/base/pk11_slot.h"
+
+#include <pk11pub.h>
+
+namespace net {
+
+std::string PK11Slot::GetTokenName() const {
+ return PK11_GetTokenName(slot_handle_);
+}
+
+// static
+PK11Slot* PK11Slot::CreateFromHandle(OSSlotHandle handle) {
+ return new PK11Slot(handle);
+}
+
+PK11Slot::PK11Slot(OSSlotHandle handle) : slot_handle_(handle) {
+ PK11_ReferenceSlot(slot_handle_);
+}
+
+PK11Slot::~PK11Slot() {
+ PK11_FreeSlot(slot_handle_);
+}
+
+} // namespace net

Powered by Google App Engine
This is Rietveld 408576698