OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <cert.h> // Must be included before certdb.h | 5 #include <cert.h> // Must be included before certdb.h |
6 #include <certdb.h> | 6 #include <certdb.h> |
7 #include <cryptohi.h> | 7 #include <cryptohi.h> |
8 #include <nss.h> | 8 #include <nss.h> |
9 #include <pk11pub.h> | 9 #include <pk11pub.h> |
10 #include <prerror.h> | 10 #include <prerror.h> |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 } | 232 } |
233 default: | 233 default: |
234 NOTREACHED() << "Certificate format " << format << " unimplemented"; | 234 NOTREACHED() << "Certificate format " << format << " unimplemented"; |
235 break; | 235 break; |
236 } | 236 } |
237 | 237 |
238 return results; | 238 return results; |
239 } | 239 } |
240 | 240 |
241 X509Certificate::OSCertHandle ReadOSCertHandleFromPickle( | 241 X509Certificate::OSCertHandle ReadOSCertHandleFromPickle( |
242 PickleIterator* pickle_iter) { | 242 base::PickleIterator* pickle_iter) { |
243 const char* data; | 243 const char* data; |
244 int length; | 244 int length; |
245 if (!pickle_iter->ReadData(&data, &length)) | 245 if (!pickle_iter->ReadData(&data, &length)) |
246 return NULL; | 246 return NULL; |
247 | 247 |
248 return X509Certificate::CreateOSCertHandleFromBytes(data, length); | 248 return X509Certificate::CreateOSCertHandleFromBytes(data, length); |
249 } | 249 } |
250 | 250 |
251 void GetPublicKeyInfo(CERTCertificate* handle, | 251 void GetPublicKeyInfo(CERTCertificate* handle, |
252 size_t* size_bits, | 252 size_t* size_bits, |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 base::SStringPrintf(&new_name, "%s #%d", nickname.c_str(), index++); | 337 base::SStringPrintf(&new_name, "%s #%d", nickname.c_str(), index++); |
338 temp_nickname = token_name + new_name; | 338 temp_nickname = token_name + new_name; |
339 } | 339 } |
340 | 340 |
341 return new_name; | 341 return new_name; |
342 } | 342 } |
343 | 343 |
344 } // namespace x509_util | 344 } // namespace x509_util |
345 | 345 |
346 } // namespace net | 346 } // namespace net |
OLD | NEW |