OLD | NEW |
1 /* ***** BEGIN LICENSE BLOCK ***** | 1 /* ***** BEGIN LICENSE BLOCK ***** |
2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
3 * | 3 * |
4 * The contents of this file are subject to the Mozilla Public License Version | 4 * The contents of this file are subject to the Mozilla Public License Version |
5 * 1.1 (the "License"); you may not use this file except in compliance with | 5 * 1.1 (the "License"); you may not use this file except in compliance with |
6 * the License. You may obtain a copy of the License at | 6 * the License. You may obtain a copy of the License at |
7 * http://www.mozilla.org/MPL/ | 7 * http://www.mozilla.org/MPL/ |
8 * | 8 * |
9 * Software distributed under the License is distributed on an "AS IS" basis, | 9 * Software distributed under the License is distributed on an "AS IS" basis, |
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | 10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License |
(...skipping 25 matching lines...) Expand all Loading... |
36 * the provisions above, a recipient may use your version of this file under | 36 * the provisions above, a recipient may use your version of this file under |
37 * the terms of any one of the MPL, the GPL or the LGPL. | 37 * the terms of any one of the MPL, the GPL or the LGPL. |
38 * | 38 * |
39 * ***** END LICENSE BLOCK ***** */ | 39 * ***** END LICENSE BLOCK ***** */ |
40 | 40 |
41 #include "chrome/third_party/mozilla_security_manager/nsNSSCertHelper.h" | 41 #include "chrome/third_party/mozilla_security_manager/nsNSSCertHelper.h" |
42 | 42 |
43 #include <certdb.h> | 43 #include <certdb.h> |
44 #include <keyhi.h> | 44 #include <keyhi.h> |
45 #include <prprf.h> | 45 #include <prprf.h> |
| 46 #include <stddef.h> |
46 #include <unicode/uidna.h> | 47 #include <unicode/uidna.h> |
47 | 48 |
48 #include "base/i18n/number_formatting.h" | 49 #include "base/i18n/number_formatting.h" |
49 #include "base/lazy_instance.h" | 50 #include "base/lazy_instance.h" |
| 51 #include "base/macros.h" |
50 #include "base/strings/string_number_conversions.h" | 52 #include "base/strings/string_number_conversions.h" |
51 #include "base/strings/stringprintf.h" | 53 #include "base/strings/stringprintf.h" |
52 #include "base/strings/utf_string_conversions.h" | 54 #include "base/strings/utf_string_conversions.h" |
53 #include "chrome/common/net/x509_certificate_model.h" | 55 #include "chrome/common/net/x509_certificate_model.h" |
| 56 #include "chrome/grit/generated_resources.h" |
54 #include "crypto/scoped_nss_types.h" | 57 #include "crypto/scoped_nss_types.h" |
55 #include "chrome/grit/generated_resources.h" | |
56 #include "net/base/address_family.h" | 58 #include "net/base/address_family.h" |
57 #include "net/base/ip_address_number.h" | 59 #include "net/base/ip_address_number.h" |
58 #include "net/base/ip_endpoint.h" | 60 #include "net/base/ip_endpoint.h" |
59 #include "ui/base/l10n/l10n_util.h" | 61 #include "ui/base/l10n/l10n_util.h" |
60 | 62 |
61 #if !defined(CERTDB_TERMINAL_RECORD) | 63 #if !defined(CERTDB_TERMINAL_RECORD) |
62 /* NSS 3.13 renames CERTDB_VALID_PEER to CERTDB_TERMINAL_RECORD | 64 /* NSS 3.13 renames CERTDB_VALID_PEER to CERTDB_TERMINAL_RECORD |
63 * and marks CERTDB_VALID_PEER as deprecated. | 65 * and marks CERTDB_VALID_PEER as deprecated. |
64 * If we're using an older version, rename it ourselves. | 66 * If we're using an older version, rename it ourselves. |
65 */ | 67 */ |
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 return net::USER_CERT; | 1077 return net::USER_CERT; |
1076 if ((all_flags & CERTDB_VALID_CA) || CERT_IsCACert(cert, NULL)) | 1078 if ((all_flags & CERTDB_VALID_CA) || CERT_IsCACert(cert, NULL)) |
1077 return net::CA_CERT; | 1079 return net::CA_CERT; |
1078 // TODO(mattm): http://crbug.com/128633. | 1080 // TODO(mattm): http://crbug.com/128633. |
1079 if (trust.sslFlags & CERTDB_TERMINAL_RECORD) | 1081 if (trust.sslFlags & CERTDB_TERMINAL_RECORD) |
1080 return net::SERVER_CERT; | 1082 return net::SERVER_CERT; |
1081 return net::OTHER_CERT; | 1083 return net::OTHER_CERT; |
1082 } | 1084 } |
1083 | 1085 |
1084 } // namespace mozilla_security_manager | 1086 } // namespace mozilla_security_manager |
OLD | NEW |