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

Side by Side Diff: net/base/x509_util_nss.cc

Issue 10451068: Fixing gcc 4.7 building problems. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Wrap unisdt.h using OS_POSIX macro Created 8 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
« no previous file with comments | « ipc/ipc_platform_file.cc ('k') | ppapi/tests/test_broker.cc » ('j') | 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/base/x509_util.h" 5 #include "net/base/x509_util.h"
6 #include "net/base/x509_util_nss.h" 6 #include "net/base/x509_util_nss.h"
7 7
8 #include <cert.h> 8 #include <cert.h>
9 #include <cryptohi.h> 9 #include <cryptohi.h>
10 #include <pk11pub.h> 10 #include <pk11pub.h>
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 if ((cert_handle = CERT_StartCertExtensions(cert)) == NULL) { 189 if ((cert_handle = CERT_StartCertExtensions(cert)) == NULL) {
190 LOG(ERROR) << "Unable to get opaque handle for adding extensions"; 190 LOG(ERROR) << "Unable to get opaque handle for adding extensions";
191 CERT_DestroyCertificate(cert); 191 CERT_DestroyCertificate(cert);
192 return false; 192 return false;
193 } 193 }
194 194
195 // Create SECItem for IA5String encoding. 195 // Create SECItem for IA5String encoding.
196 SECItem domain_string_item = { 196 SECItem domain_string_item = {
197 siAsciiString, 197 siAsciiString,
198 (unsigned char*)domain.data(), 198 (unsigned char*)domain.data(),
199 domain.size() 199 static_cast<unsigned>(domain.size())
200 }; 200 };
201 201
202 // IA5Encode and arena allocate SECItem 202 // IA5Encode and arena allocate SECItem
203 SECItem* asn1_domain_string = SEC_ASN1EncodeItem( 203 SECItem* asn1_domain_string = SEC_ASN1EncodeItem(
204 cert->arena, NULL, &domain_string_item, 204 cert->arena, NULL, &domain_string_item,
205 SEC_ASN1_GET(SEC_IA5StringTemplate)); 205 SEC_ASN1_GET(SEC_IA5StringTemplate));
206 if (asn1_domain_string == NULL) { 206 if (asn1_domain_string == NULL) {
207 LOG(ERROR) << "Unable to get ASN1 encoding for domain in domain_bound_cert" 207 LOG(ERROR) << "Unable to get ASN1 encoding for domain in domain_bound_cert"
208 " extension"; 208 " extension";
209 CERT_DestroyCertificate(cert); 209 CERT_DestroyCertificate(cert);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 domain, 283 domain,
284 serial_number, 284 serial_number,
285 not_valid_before, 285 not_valid_before,
286 not_valid_after, 286 not_valid_after,
287 der_cert); 287 der_cert);
288 } 288 }
289 289
290 } // namespace x509_util 290 } // namespace x509_util
291 291
292 } // namespace net 292 } // namespace net
OLDNEW
« no previous file with comments | « ipc/ipc_platform_file.cc ('k') | ppapi/tests/test_broker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698