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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 if (CERT_DecodeBasicConstraintValue(&value, extension_data) != SECSuccess) | 439 if (CERT_DecodeBasicConstraintValue(&value, extension_data) != SECSuccess) |
440 return ProcessRawBytes(extension_data); | 440 return ProcessRawBytes(extension_data); |
441 | 441 |
442 std::string rv; | 442 std::string rv; |
443 if (value.isCA) | 443 if (value.isCA) |
444 rv = l10n_util::GetStringUTF8(IDS_CERT_X509_BASIC_CONSTRAINT_IS_CA); | 444 rv = l10n_util::GetStringUTF8(IDS_CERT_X509_BASIC_CONSTRAINT_IS_CA); |
445 else | 445 else |
446 rv = l10n_util::GetStringUTF8(IDS_CERT_X509_BASIC_CONSTRAINT_IS_NOT_CA); | 446 rv = l10n_util::GetStringUTF8(IDS_CERT_X509_BASIC_CONSTRAINT_IS_NOT_CA); |
447 rv += '\n'; | 447 rv += '\n'; |
448 if (value.pathLenConstraint != -1) { | 448 if (value.pathLenConstraint != -1) { |
449 string16 depth; | 449 base::string16 depth; |
450 if (value.pathLenConstraint == CERT_UNLIMITED_PATH_CONSTRAINT) { | 450 if (value.pathLenConstraint == CERT_UNLIMITED_PATH_CONSTRAINT) { |
451 depth = l10n_util::GetStringUTF16( | 451 depth = l10n_util::GetStringUTF16( |
452 IDS_CERT_X509_BASIC_CONSTRAINT_PATH_LEN_UNLIMITED); | 452 IDS_CERT_X509_BASIC_CONSTRAINT_PATH_LEN_UNLIMITED); |
453 } else { | 453 } else { |
454 depth = base::FormatNumber(value.pathLenConstraint); | 454 depth = base::FormatNumber(value.pathLenConstraint); |
455 } | 455 } |
456 rv += l10n_util::GetStringFUTF8(IDS_CERT_X509_BASIC_CONSTRAINT_PATH_LEN, | 456 rv += l10n_util::GetStringFUTF8(IDS_CERT_X509_BASIC_CONSTRAINT_PATH_LEN, |
457 depth); | 457 depth); |
458 } | 458 } |
459 return rv; | 459 return rv; |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
820 CERTAuthInfoAccess* desc; | 820 CERTAuthInfoAccess* desc; |
821 crypto::ScopedPLArenaPool arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE)); | 821 crypto::ScopedPLArenaPool arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE)); |
822 CHECK(arena.get()); | 822 CHECK(arena.get()); |
823 | 823 |
824 aia = CERT_DecodeAuthInfoAccessExtension(arena.get(), extension_data); | 824 aia = CERT_DecodeAuthInfoAccessExtension(arena.get(), extension_data); |
825 if (aia == NULL) | 825 if (aia == NULL) |
826 return l10n_util::GetStringUTF8(IDS_CERT_EXTENSION_DUMP_ERROR); | 826 return l10n_util::GetStringUTF8(IDS_CERT_EXTENSION_DUMP_ERROR); |
827 | 827 |
828 while (*aia != NULL) { | 828 while (*aia != NULL) { |
829 desc = *aia++; | 829 desc = *aia++; |
830 string16 location_str = UTF8ToUTF16(ProcessGeneralName(arena.get(), | 830 base::string16 location_str = |
831 desc->location)); | 831 UTF8ToUTF16(ProcessGeneralName(arena.get(), desc->location)); |
832 switch (SECOID_FindOIDTag(&desc->method)) { | 832 switch (SECOID_FindOIDTag(&desc->method)) { |
833 case SEC_OID_PKIX_OCSP: | 833 case SEC_OID_PKIX_OCSP: |
834 rv += l10n_util::GetStringFUTF8(IDS_CERT_OCSP_RESPONDER_FORMAT, | 834 rv += l10n_util::GetStringFUTF8(IDS_CERT_OCSP_RESPONDER_FORMAT, |
835 location_str); | 835 location_str); |
836 break; | 836 break; |
837 case SEC_OID_PKIX_CA_ISSUERS: | 837 case SEC_OID_PKIX_CA_ISSUERS: |
838 rv += l10n_util::GetStringFUTF8(IDS_CERT_CA_ISSUERS_FORMAT, | 838 rv += l10n_util::GetStringFUTF8(IDS_CERT_CA_ISSUERS_FORMAT, |
839 location_str); | 839 location_str); |
840 break; | 840 break; |
841 default: | 841 default: |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1056 return net::USER_CERT; | 1056 return net::USER_CERT; |
1057 if ((all_flags & CERTDB_VALID_CA) || CERT_IsCACert(cert, NULL)) | 1057 if ((all_flags & CERTDB_VALID_CA) || CERT_IsCACert(cert, NULL)) |
1058 return net::CA_CERT; | 1058 return net::CA_CERT; |
1059 // TODO(mattm): http://crbug.com/128633. | 1059 // TODO(mattm): http://crbug.com/128633. |
1060 if (trust.sslFlags & CERTDB_TERMINAL_RECORD) | 1060 if (trust.sslFlags & CERTDB_TERMINAL_RECORD) |
1061 return net::SERVER_CERT; | 1061 return net::SERVER_CERT; |
1062 return net::OTHER_CERT; | 1062 return net::OTHER_CERT; |
1063 } | 1063 } |
1064 | 1064 |
1065 } // namespace mozilla_security_manager | 1065 } // namespace mozilla_security_manager |
OLD | NEW |