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

Unified Diff: crypto/hmac_nss.cc

Issue 8373022: Fixed slot selection in HMAC class to ensure that we are using softtoken instead of TPM slots. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/hmac_nss.cc
===================================================================
--- crypto/hmac_nss.cc (revision 106500)
+++ crypto/hmac_nss.cc (working copy)
@@ -12,6 +12,10 @@
#include "crypto/nss_util.h"
#include "crypto/scoped_nss_types.h"
+#if defined(OS_CHROMEOS)
+#include "crypto/nss_util_internal.h"
+#endif
+
namespace crypto {
struct HMACPlatformData {
@@ -48,7 +52,11 @@
return false;
}
+#if defined(OS_CHROMEOS)
Will Drewry 2011/10/22 19:05:40 Might be worth putting in a comment explaining why
zel 2011/10/22 19:13:15 Done.
+ plat_->slot_.reset(GetPublicNSSKeySlot());
+#else
plat_->slot_.reset(PK11_GetBestSlot(plat_->mechanism_, NULL));
+#endif
if (!plat_->slot_.get()) {
NOTREACHED();
return false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698