Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(587)

Side by Side Diff: chrome/third_party/mozilla_security_manager/nsNSSCertHelper.cpp

Issue 3015001: Coverity: fix missing break in GetOIDText, missing commas in ProcessCrlDistPoints output. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 string_id = IDS_CERT_EKU_CODE_SIGNING; 361 string_id = IDS_CERT_EKU_CODE_SIGNING;
362 break; 362 break;
363 case SEC_OID_EXT_KEY_USAGE_EMAIL_PROTECT: 363 case SEC_OID_EXT_KEY_USAGE_EMAIL_PROTECT:
364 string_id = IDS_CERT_EKU_EMAIL_PROTECTION; 364 string_id = IDS_CERT_EKU_EMAIL_PROTECTION;
365 break; 365 break;
366 case SEC_OID_EXT_KEY_USAGE_TIME_STAMP: 366 case SEC_OID_EXT_KEY_USAGE_TIME_STAMP:
367 string_id = IDS_CERT_EKU_TIME_STAMPING; 367 string_id = IDS_CERT_EKU_TIME_STAMPING;
368 break; 368 break;
369 case SEC_OID_OCSP_RESPONDER: 369 case SEC_OID_OCSP_RESPONDER:
370 string_id = IDS_CERT_EKU_OCSP_SIGNING; 370 string_id = IDS_CERT_EKU_OCSP_SIGNING;
371 break;
371 case SEC_OID_PKIX_CPS_POINTER_QUALIFIER: 372 case SEC_OID_PKIX_CPS_POINTER_QUALIFIER:
372 string_id = IDS_CERT_PKIX_CPS_POINTER_QUALIFIER; 373 string_id = IDS_CERT_PKIX_CPS_POINTER_QUALIFIER;
373 break; 374 break;
374 case SEC_OID_PKIX_USER_NOTICE_QUALIFIER: 375 case SEC_OID_PKIX_USER_NOTICE_QUALIFIER:
375 string_id = IDS_CERT_PKIX_USER_NOTICE_QUALIFIER; 376 string_id = IDS_CERT_PKIX_USER_NOTICE_QUALIFIER;
376 break; 377 break;
377 378
378 // There are a billionty other OIDs we could add here. I tried to get the 379 // There are a billionty other OIDs we could add here. I tried to get the
379 // important ones... 380 // important ones...
380 default: 381 default:
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 break; 837 break;
837 } 838 }
838 if (point->reasons.len) { 839 if (point->reasons.len) {
839 rv += ' '; 840 rv += ' ';
840 comma = false; 841 comma = false;
841 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(reason_string_map); ++i) { 842 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(reason_string_map); ++i) {
842 if (point->reasons.data[0] & reason_string_map[i].reason) { 843 if (point->reasons.data[0] & reason_string_map[i].reason) {
843 if (comma) 844 if (comma)
844 rv += ','; 845 rv += ',';
845 rv += l10n_util::GetStringUTF8(reason_string_map[i].string_id); 846 rv += l10n_util::GetStringUTF8(reason_string_map[i].string_id);
847 comma = true;
846 } 848 }
847 } 849 }
848 rv += '\n'; 850 rv += '\n';
849 } 851 }
850 if (point->crlIssuer) { 852 if (point->crlIssuer) {
851 rv += l10n_util::GetStringFUTF8( 853 rv += l10n_util::GetStringFUTF8(
852 IDS_CERT_ISSUER_FORMAT, 854 IDS_CERT_ISSUER_FORMAT,
853 UTF8ToUTF16(ProcessGeneralNames(arena.get(), point->crlIssuer))); 855 UTF8ToUTF16(ProcessGeneralNames(arena.get(), point->crlIssuer)));
854 } 856 }
855 } 857 }
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 if (trust.HasPeer(PR_FALSE, PR_TRUE, PR_FALSE) && cert->emailAddr) 1099 if (trust.HasPeer(PR_FALSE, PR_TRUE, PR_FALSE) && cert->emailAddr)
1098 return EMAIL_CERT; 1100 return EMAIL_CERT;
1099 if (CERT_IsCACert(cert, NULL)) 1101 if (CERT_IsCACert(cert, NULL))
1100 return CA_CERT; 1102 return CA_CERT;
1101 if (cert->emailAddr) 1103 if (cert->emailAddr)
1102 return EMAIL_CERT; 1104 return EMAIL_CERT;
1103 return UNKNOWN_CERT; 1105 return UNKNOWN_CERT;
1104 } 1106 }
1105 1107
1106 } // namespace mozilla_security_manager 1108 } // namespace mozilla_security_manager
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698