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

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

Issue 1158923005: Use the exact-width integer types defined in <stdint.h> rather than (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak comments. Exclude mime_sniffer*. Rebase. Created 5 years, 6 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
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_util_mac.h" 5 #include "net/cert/x509_util_mac.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "third_party/apple_apsl/cssmapplePriv.h" 8 #include "third_party/apple_apsl/cssmapplePriv.h"
9 9
10 namespace net { 10 namespace net {
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 } 204 }
205 205
206 OSStatus CSSMCachedCertificate::GetField(const CSSM_OID* field_oid, 206 OSStatus CSSMCachedCertificate::GetField(const CSSM_OID* field_oid,
207 CSSMFieldValue* field) const { 207 CSSMFieldValue* field) const {
208 DCHECK(cl_handle_); 208 DCHECK(cl_handle_);
209 DCHECK(cached_cert_handle_); 209 DCHECK(cached_cert_handle_);
210 210
211 CSSM_OID_PTR oid = const_cast<CSSM_OID_PTR>(field_oid); 211 CSSM_OID_PTR oid = const_cast<CSSM_OID_PTR>(field_oid);
212 CSSM_DATA_PTR field_ptr = NULL; 212 CSSM_DATA_PTR field_ptr = NULL;
213 CSSM_HANDLE results_handle = CSSM_INVALID_HANDLE; 213 CSSM_HANDLE results_handle = CSSM_INVALID_HANDLE;
214 uint32 field_value_count = 0; 214 uint32_t field_value_count = 0;
215 CSSM_RETURN status = CSSM_CL_CertGetFirstCachedFieldValue( 215 CSSM_RETURN status = CSSM_CL_CertGetFirstCachedFieldValue(
216 cl_handle_, cached_cert_handle_, oid, &results_handle, 216 cl_handle_, cached_cert_handle_, oid, &results_handle,
217 &field_value_count, &field_ptr); 217 &field_value_count, &field_ptr);
218 if (status) 218 if (status)
219 return status; 219 return status;
220 220
221 // Note: |field_value_count| may be > 1, indicating that more than one 221 // Note: |field_value_count| may be > 1, indicating that more than one
222 // value is present. This may happen with extensions, but for current 222 // value is present. This may happen with extensions, but for current
223 // usages, only the first value is returned. 223 // usages, only the first value is returned.
224 CSSM_CL_CertAbortQuery(cl_handle_, results_handle); 224 CSSM_CL_CertAbortQuery(cl_handle_, results_handle);
225 field->Reset(cl_handle_, oid, field_ptr); 225 field->Reset(cl_handle_, oid, field_ptr);
226 return CSSM_OK; 226 return CSSM_OK;
227 } 227 }
228 228
229 } // namespace x509_util 229 } // namespace x509_util
230 230
231 } // namespace net 231 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698