OLD | NEW |
1 /* | 1 /* |
2 * NSS utility functions | 2 * NSS utility functions |
3 * | 3 * |
4 * This Source Code Form is subject to the terms of the Mozilla Public | 4 * This Source Code Form is subject to the terms of the Mozilla Public |
5 * License, v. 2.0. If a copy of the MPL was not distributed with this | 5 * License, v. 2.0. If a copy of the MPL was not distributed with this |
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
7 | 7 |
8 #include "net/third_party/nss/ssl/cmpcert.h" | 8 #include "net/third_party/nss/ssl/cmpcert.h" |
9 | 9 |
10 #include <secder.h> | 10 #include <secder.h> |
11 #include <secitem.h> | 11 #include <secitem.h> |
12 | 12 |
13 #include "base/logging.h" | |
14 #include "base/strings/string_piece.h" | 13 #include "base/strings/string_piece.h" |
15 | 14 |
16 namespace net { | 15 namespace net { |
17 | 16 |
18 bool MatchClientCertificateIssuers( | 17 bool MatchClientCertificateIssuers( |
19 CERTCertificate* cert, | 18 CERTCertificate* cert, |
20 const std::vector<std::string>& cert_authorities, | 19 const std::vector<std::string>& cert_authorities, |
21 std::vector<ScopedCERTCertificate>* intermediates) { | 20 std::vector<ScopedCERTCertificate>* intermediates) { |
22 // Bound how many iterations to try. | 21 // Bound how many iterations to try. |
23 static const int kMaxDepth = 20; | 22 static const int kMaxDepth = 20; |
(...skipping 26 matching lines...) Expand all Loading... |
50 curcert = CERT_FindCertByName(curcert->dbhandle, &curcert->derIssuer); | 49 curcert = CERT_FindCertByName(curcert->dbhandle, &curcert->derIssuer); |
51 if (!curcert) | 50 if (!curcert) |
52 return false; | 51 return false; |
53 intermediates->emplace_back(curcert); | 52 intermediates->emplace_back(curcert); |
54 } | 53 } |
55 | 54 |
56 return false; | 55 return false; |
57 } | 56 } |
58 | 57 |
59 } // namespace net | 58 } // namespace net |
OLD | NEW |