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

Side by Side Diff: net/cert/x509_util_nss.cc

Issue 36593002: crypto/nss_util: Get TPM slot id, do lookup by id instead of by name. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sandbox debugging crap Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/cert/x509_util.h" 5 #include "net/cert/x509_util.h"
6 #include "net/cert/x509_util_nss.h" 6 #include "net/cert/x509_util_nss.h"
7 7
8 #include <cert.h> // Must be included before certdb.h 8 #include <cert.h> // Must be included before certdb.h
9 #include <certdb.h> 9 #include <certdb.h>
10 #include <cryptohi.h> 10 #include <cryptohi.h>
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 } 475 }
476 476
477 X509Certificate::OSCertHandles CreateOSCertHandlesFromBytes( 477 X509Certificate::OSCertHandles CreateOSCertHandlesFromBytes(
478 const char* data, 478 const char* data,
479 int length, 479 int length,
480 X509Certificate::Format format) { 480 X509Certificate::Format format) {
481 X509Certificate::OSCertHandles results; 481 X509Certificate::OSCertHandles results;
482 if (length < 0) 482 if (length < 0)
483 return results; 483 return results;
484 484
485 LOG(ERROR) << "HIIIIIIIIIIIIIIIIIIIIIIIIIII";
485 crypto::EnsureNSSInit(); 486 crypto::EnsureNSSInit();
486 487
487 if (!NSS_IsInitialized()) 488 if (!NSS_IsInitialized())
488 return results; 489 return results;
489 490
490 switch (format) { 491 switch (format) {
491 case X509Certificate::FORMAT_SINGLE_CERTIFICATE: { 492 case X509Certificate::FORMAT_SINGLE_CERTIFICATE: {
492 X509Certificate::OSCertHandle handle = 493 X509Certificate::OSCertHandle handle =
493 X509Certificate::CreateOSCertHandleFromBytes(data, length); 494 X509Certificate::CreateOSCertHandleFromBytes(data, length);
494 if (handle) 495 if (handle)
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 } 617 }
617 618
618 return new_name; 619 return new_name;
619 } 620 }
620 621
621 #endif // defined(USE_NSS) || defined(OS_IOS) 622 #endif // defined(USE_NSS) || defined(OS_IOS)
622 623
623 } // namespace x509_util 624 } // namespace x509_util
624 625
625 } // namespace net 626 } // namespace net
OLDNEW
« crypto/nss_util_internal.h ('K') | « net/cert/x509_util_ios.cc ('k') | net/http/des.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698