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

Side by Side Diff: net/cert/x509_certificate_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, 1 month 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_certificate.h" 5 #include "net/cert/x509_certificate.h"
6 6
7 #include <cert.h> 7 #include <cert.h>
8 #include <cryptohi.h> 8 #include <cryptohi.h>
9 #include <keyhi.h> 9 #include <keyhi.h>
10 #include <nss.h> 10 #include <nss.h>
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 // static 167 // static
168 X509Certificate::OSCertHandle 168 X509Certificate::OSCertHandle
169 X509Certificate::CreateOSCertHandleFromBytesWithNickname( 169 X509Certificate::CreateOSCertHandleFromBytesWithNickname(
170 const char* data, 170 const char* data,
171 int length, 171 int length,
172 const char* nickname) { 172 const char* nickname) {
173 if (length < 0) 173 if (length < 0)
174 return NULL; 174 return NULL;
175 175
176 LOG(ERROR) << "HIIIIIIIIIIIIIIIIIIIIIIIIIII";
176 crypto::EnsureNSSInit(); 177 crypto::EnsureNSSInit();
177 178
178 if (!NSS_IsInitialized()) 179 if (!NSS_IsInitialized())
179 return NULL; 180 return NULL;
180 181
181 SECItem der_cert; 182 SECItem der_cert;
182 der_cert.data = reinterpret_cast<unsigned char*>(const_cast<char*>(data)); 183 der_cert.data = reinterpret_cast<unsigned char*>(const_cast<char*>(data));
183 der_cert.len = length; 184 der_cert.len = length;
184 der_cert.type = siDERCertBuffer; 185 der_cert.type = siDERCertBuffer;
185 186
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } 261 }
261 262
262 // static 263 // static
263 void X509Certificate::GetPublicKeyInfo(OSCertHandle cert_handle, 264 void X509Certificate::GetPublicKeyInfo(OSCertHandle cert_handle,
264 size_t* size_bits, 265 size_t* size_bits,
265 PublicKeyType* type) { 266 PublicKeyType* type) {
266 x509_util::GetPublicKeyInfo(cert_handle, size_bits, type); 267 x509_util::GetPublicKeyInfo(cert_handle, size_bits, type);
267 } 268 }
268 269
269 } // namespace net 270 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698