OLD | NEW |
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 "chrome/common/net/x509_certificate_model.h" | 5 #include "chrome/common/net/x509_certificate_model.h" |
6 | 6 |
7 #include <cert.h> | 7 #include <cert.h> |
8 #include <cms.h> | 8 #include <cms.h> |
9 #include <hasht.h> | 9 #include <hasht.h> |
10 #include <keyhi.h> // SECKEY_DestroyPrivateKey | 10 #include <keyhi.h> // SECKEY_DestroyPrivateKey |
11 #include <keythi.h> // SECKEYPrivateKey | 11 #include <keythi.h> // SECKEYPrivateKey |
12 #include <pk11pub.h> // PK11_FindKeyByAnyCert | 12 #include <pk11pub.h> // PK11_FindKeyByAnyCert |
13 #include <seccomon.h> // SECItem | 13 #include <seccomon.h> // SECItem |
14 #include <sechash.h> | 14 #include <sechash.h> |
15 | 15 |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
18 #include "chrome/third_party/mozilla_security_manager/nsNSSCertHelper.h" | 18 #include "chrome/third_party/mozilla_security_manager/nsNSSCertHelper.h" |
19 #include "chrome/third_party/mozilla_security_manager/nsNSSCertificate.h" | 19 #include "chrome/third_party/mozilla_security_manager/nsNSSCertificate.h" |
20 #include "chrome/third_party/mozilla_security_manager/nsUsageArrayHelper.h" | 20 #include "chrome/third_party/mozilla_security_manager/nsUsageArrayHelper.h" |
21 #include "crypto/nss_util.h" | 21 #include "crypto/nss_util.h" |
22 #include "crypto/scoped_nss_types.h" | 22 #include "crypto/scoped_nss_types.h" |
23 #include "net/base/x509_certificate.h" | 23 #include "net/cert/x509_certificate.h" |
24 | 24 |
25 namespace psm = mozilla_security_manager; | 25 namespace psm = mozilla_security_manager; |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 // Convert a char* return value from NSS into a std::string and free the NSS | 29 // Convert a char* return value from NSS into a std::string and free the NSS |
30 // memory. If the arg is NULL, an empty string will be returned instead. | 30 // memory. If the arg is NULL, an empty string will be returned instead. |
31 std::string Stringize(char* nss_text, const std::string& alternative_text) { | 31 std::string Stringize(char* nss_text, const std::string& alternative_text) { |
32 if (!nss_text) | 32 if (!nss_text) |
33 return alternative_text; | 33 return alternative_text; |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 string ProcessRawBitsSignatureWrap(X509Certificate::OSCertHandle cert_handle) { | 407 string ProcessRawBitsSignatureWrap(X509Certificate::OSCertHandle cert_handle) { |
408 return ProcessRawBits(cert_handle->signatureWrap.signature.data, | 408 return ProcessRawBits(cert_handle->signatureWrap.signature.data, |
409 cert_handle->signatureWrap.signature.len); | 409 cert_handle->signatureWrap.signature.len); |
410 } | 410 } |
411 | 411 |
412 void RegisterDynamicOids() { | 412 void RegisterDynamicOids() { |
413 psm::RegisterDynamicOids(); | 413 psm::RegisterDynamicOids(); |
414 } | 414 } |
415 | 415 |
416 } // namespace x509_certificate_model | 416 } // namespace x509_certificate_model |
OLD | NEW |