| 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 30 matching lines...) Expand all Loading... |
| 41 #include "chrome/third_party/mozilla_security_manager/nsNSSCertHelper.h" | 41 #include "chrome/third_party/mozilla_security_manager/nsNSSCertHelper.h" |
| 42 | 42 |
| 43 #include <keyhi.h> | 43 #include <keyhi.h> |
| 44 #include <prprf.h> | 44 #include <prprf.h> |
| 45 #include <unicode/uidna.h> | 45 #include <unicode/uidna.h> |
| 46 | 46 |
| 47 #include "app/l10n_util.h" | 47 #include "app/l10n_util.h" |
| 48 #include "base/i18n/number_formatting.h" | 48 #include "base/i18n/number_formatting.h" |
| 49 #include "base/string_number_conversions.h" | 49 #include "base/string_number_conversions.h" |
| 50 #include "base/utf_string_conversions.h" | 50 #include "base/utf_string_conversions.h" |
| 51 #include "chrome/third_party/mozilla_security_manager/nsNSSCertTrust.h" | |
| 52 #include "grit/generated_resources.h" | 51 #include "grit/generated_resources.h" |
| 53 #include "net/base/net_util.h" | 52 #include "net/base/net_util.h" |
| 53 #include "net/third_party/mozilla_security_manager/nsNSSCertTrust.h" |
| 54 | 54 |
| 55 namespace { | 55 namespace { |
| 56 | 56 |
| 57 std::string BMPtoUTF8(PRArenaPool* arena, unsigned char* data, | 57 std::string BMPtoUTF8(PRArenaPool* arena, unsigned char* data, |
| 58 unsigned int len) { | 58 unsigned int len) { |
| 59 if (len % 2 != 0) | 59 if (len % 2 != 0) |
| 60 return l10n_util::GetStringUTF8(IDS_CERT_EXTENSION_DUMP_ERROR); | 60 return l10n_util::GetStringUTF8(IDS_CERT_EXTENSION_DUMP_ERROR); |
| 61 | 61 |
| 62 unsigned int utf8_val_len = len * 3 + 1; | 62 unsigned int utf8_val_len = len * 3 + 1; |
| 63 std::vector<unsigned char> utf8_val(utf8_val_len); | 63 std::vector<unsigned char> utf8_val(utf8_val_len); |
| (...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1100 if (trust.HasPeer(PR_FALSE, PR_TRUE, PR_FALSE) && cert->emailAddr) | 1100 if (trust.HasPeer(PR_FALSE, PR_TRUE, PR_FALSE) && cert->emailAddr) |
| 1101 return EMAIL_CERT; | 1101 return EMAIL_CERT; |
| 1102 if (CERT_IsCACert(cert, NULL)) | 1102 if (CERT_IsCACert(cert, NULL)) |
| 1103 return CA_CERT; | 1103 return CA_CERT; |
| 1104 if (cert->emailAddr) | 1104 if (cert->emailAddr) |
| 1105 return EMAIL_CERT; | 1105 return EMAIL_CERT; |
| 1106 return UNKNOWN_CERT; | 1106 return UNKNOWN_CERT; |
| 1107 } | 1107 } |
| 1108 | 1108 |
| 1109 } // namespace mozilla_security_manager | 1109 } // namespace mozilla_security_manager |
| OLD | NEW |