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 29 matching lines...) Expand all Loading... |
40 | 40 |
41 #include <cert.h> | 41 #include <cert.h> |
42 #include <certdb.h> | 42 #include <certdb.h> |
43 #include <pk11pub.h> | 43 #include <pk11pub.h> |
44 #include <secerr.h> | 44 #include <secerr.h> |
45 | 45 |
46 #include "base/logging.h" | 46 #include "base/logging.h" |
47 #include "crypto/nss_util_internal.h" | 47 #include "crypto/nss_util_internal.h" |
48 #include "crypto/scoped_nss_types.h" | 48 #include "crypto/scoped_nss_types.h" |
49 #include "net/base/net_errors.h" | 49 #include "net/base/net_errors.h" |
50 #include "net/base/x509_certificate.h" | 50 #include "net/cert/x509_certificate.h" |
51 | 51 |
52 #if !defined(CERTDB_TERMINAL_RECORD) | 52 #if !defined(CERTDB_TERMINAL_RECORD) |
53 /* NSS 3.13 renames CERTDB_VALID_PEER to CERTDB_TERMINAL_RECORD | 53 /* NSS 3.13 renames CERTDB_VALID_PEER to CERTDB_TERMINAL_RECORD |
54 * and marks CERTDB_VALID_PEER as deprecated. | 54 * and marks CERTDB_VALID_PEER as deprecated. |
55 * If we're using an older version, rename it ourselves. | 55 * If we're using an older version, rename it ourselves. |
56 */ | 56 */ |
57 #define CERTDB_TERMINAL_RECORD CERTDB_VALID_PEER | 57 #define CERTDB_TERMINAL_RECORD CERTDB_VALID_PEER |
58 #endif | 58 #endif |
59 | 59 |
60 namespace mozilla_security_manager { | 60 namespace mozilla_security_manager { |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 } else { | 268 } else { |
269 // ignore user and email/unknown certs | 269 // ignore user and email/unknown certs |
270 return true; | 270 return true; |
271 } | 271 } |
272 if (srv != SECSuccess) | 272 if (srv != SECSuccess) |
273 LOG(ERROR) << "SetCertTrust failed with error " << PORT_GetError(); | 273 LOG(ERROR) << "SetCertTrust failed with error " << PORT_GetError(); |
274 return srv == SECSuccess; | 274 return srv == SECSuccess; |
275 } | 275 } |
276 | 276 |
277 } // namespace mozilla_security_manager | 277 } // namespace mozilla_security_manager |
OLD | NEW |