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

Side by Side Diff: net/cert/x509_certificate_mac.cc

Issue 2652763008: Fix constructor call (Closed)
Patch Set: Created 3 years, 11 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/cert/x509_certificate.h" 5 #include "net/cert/x509_certificate.h"
6 6
7 #include <CommonCrypto/CommonDigest.h> 7 #include <CommonCrypto/CommonDigest.h>
8 #include <CoreServices/CoreServices.h> 8 #include <CoreServices/CoreServices.h>
9 #include <Security/Security.h> 9 #include <Security/Security.h>
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 if (name_piece == issuer_piece) 69 if (name_piece == issuer_piece)
70 return true; 70 return true;
71 } 71 }
72 72
73 return false; 73 return false;
74 } 74 }
75 75
76 void GetCertDateForOID(const x509_util::CSSMCachedCertificate& cached_cert, 76 void GetCertDateForOID(const x509_util::CSSMCachedCertificate& cached_cert,
77 const CSSM_OID* oid, 77 const CSSM_OID* oid,
78 Time* result) { 78 Time* result) {
79 *result = Time::Time(); 79 *result = Time();
80 80
81 x509_util::CSSMFieldValue field; 81 x509_util::CSSMFieldValue field;
82 OSStatus status = cached_cert.GetField(oid, &field); 82 OSStatus status = cached_cert.GetField(oid, &field);
83 if (status) 83 if (status)
84 return; 84 return;
85 85
86 const CSSM_X509_TIME* x509_time = field.GetAs<CSSM_X509_TIME>(); 86 const CSSM_X509_TIME* x509_time = field.GetAs<CSSM_X509_TIME>();
87 if (x509_time->timeType != BER_TAG_UTC_TIME && 87 if (x509_time->timeType != BER_TAG_UTC_TIME &&
88 x509_time->timeType != BER_TAG_GENERALIZED_TIME) { 88 x509_time->timeType != BER_TAG_GENERALIZED_TIME) {
89 LOG(ERROR) << "Unsupported date/time format " 89 LOG(ERROR) << "Unsupported date/time format "
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 return false; 588 return false;
589 589
590 if (CSSM_CL_CertVerify(cl_handle, 0, &cert_data, &cert_data, NULL, 0)) 590 if (CSSM_CL_CertVerify(cl_handle, 0, &cert_data, &cert_data, NULL, 0))
591 return false; 591 return false;
592 return true; 592 return true;
593 } 593 }
594 594
595 #pragma clang diagnostic pop // "-Wdeprecated-declarations" 595 #pragma clang diagnostic pop // "-Wdeprecated-declarations"
596 596
597 } // namespace net 597 } // namespace net
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