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 19 matching lines...) Expand all Loading... |
30 * use your version of this file under the terms of the MPL, indicate your | 30 * use your version of this file under the terms of the MPL, indicate your |
31 * decision by deleting the provisions above and replace them with the notice | 31 * decision by deleting the provisions above and replace them with the notice |
32 * and other provisions required by the GPL or the LGPL. If you do not delete | 32 * and other provisions required by the GPL or the LGPL. If you do not delete |
33 * the provisions above, a recipient may use your version of this file under | 33 * the provisions above, a recipient may use your version of this file under |
34 * the terms of any one of the MPL, the GPL or the LGPL. | 34 * the terms of any one of the MPL, the GPL or the LGPL. |
35 * | 35 * |
36 * ***** END LICENSE BLOCK ***** */ | 36 * ***** END LICENSE BLOCK ***** */ |
37 | 37 |
38 #include "chrome/third_party/mozilla_security_manager/nsUsageArrayHelper.h" | 38 #include "chrome/third_party/mozilla_security_manager/nsUsageArrayHelper.h" |
39 | 39 |
| 40 #include <stddef.h> |
| 41 |
40 #include "base/macros.h" | 42 #include "base/macros.h" |
41 #include "chrome/grit/generated_resources.h" | 43 #include "chrome/grit/generated_resources.h" |
42 #include "ui/base/l10n/l10n_util.h" | 44 #include "ui/base/l10n/l10n_util.h" |
43 | 45 |
44 namespace mozilla_security_manager { | 46 namespace mozilla_security_manager { |
45 | 47 |
46 void GetCertUsageStrings(CERTCertificate* cert, std::vector<std::string>* out) { | 48 void GetCertUsageStrings(CERTCertificate* cert, std::vector<std::string>* out) { |
47 SECCertificateUsage usages = 0; | 49 SECCertificateUsage usages = 0; |
48 // TODO(wtc): See if we should use X509Certificate::Verify instead. | 50 // TODO(wtc): See if we should use X509Certificate::Verify instead. |
49 if (CERT_VerifyCertificateNow(CERT_GetDefaultCertDB(), cert, PR_TRUE, | 51 if (CERT_VerifyCertificateNow(CERT_GetDefaultCertDB(), cert, PR_TRUE, |
(...skipping 15 matching lines...) Expand all Loading... |
65 }; | 67 }; |
66 for (size_t i = 0; i < arraysize(usage_string_map); ++i) { | 68 for (size_t i = 0; i < arraysize(usage_string_map); ++i) { |
67 if (usages & usage_string_map[i].usage) | 69 if (usages & usage_string_map[i].usage) |
68 out->push_back(l10n_util::GetStringUTF8( | 70 out->push_back(l10n_util::GetStringUTF8( |
69 usage_string_map[i].string_id)); | 71 usage_string_map[i].string_id)); |
70 } | 72 } |
71 } | 73 } |
72 } | 74 } |
73 | 75 |
74 } // namespace mozilla_security_manager | 76 } // namespace mozilla_security_manager |
OLD | NEW |