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

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

Issue 2753143002: move X509Certificate::SupportsSSLClientAuth to client_cert_store_mac.cc (Closed)
Patch Set: . Created 3 years, 9 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 | « net/cert/x509_certificate.h ('k') | net/cert/x509_certificate_mac.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) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 <Security/Security.h> 8 #include <Security/Security.h>
9 9
10 #include "base/mac/scoped_cftyperef.h" 10 #include "base/mac/scoped_cftyperef.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 case EVP_PKEY_EC: 351 case EVP_PKEY_EC:
352 *type = kPublicKeyTypeECDSA; 352 *type = kPublicKeyTypeECDSA;
353 break; 353 break;
354 case EVP_PKEY_DH: 354 case EVP_PKEY_DH:
355 *type = kPublicKeyTypeDH; 355 *type = kPublicKeyTypeDH;
356 break; 356 break;
357 } 357 }
358 *size_bits = EVP_PKEY_bits(key); 358 *size_bits = EVP_PKEY_bits(key);
359 } 359 }
360 360
361 bool X509Certificate::SupportsSSLClientAuth() const {
362 return false;
363 }
364
365 CFMutableArrayRef X509Certificate::CreateOSCertChainForCert() const { 361 CFMutableArrayRef X509Certificate::CreateOSCertChainForCert() const {
366 CFMutableArrayRef cert_list = 362 CFMutableArrayRef cert_list =
367 CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks); 363 CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks);
368 if (!cert_list) 364 if (!cert_list)
369 return nullptr; 365 return nullptr;
370 366
371 CFArrayAppendValue(cert_list, os_cert_handle()); 367 CFArrayAppendValue(cert_list, os_cert_handle());
372 for (size_t i = 0; i < intermediate_ca_certs_.size(); ++i) 368 for (size_t i = 0; i < intermediate_ca_certs_.size(); ++i)
373 CFArrayAppendValue(cert_list, intermediate_ca_certs_[i]); 369 CFArrayAppendValue(cert_list, intermediate_ca_certs_[i]);
374 370
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 return false; 433 return false;
438 bssl::UniquePtr<EVP_PKEY> scoped_key(X509_get_pubkey(cert.get())); 434 bssl::UniquePtr<EVP_PKEY> scoped_key(X509_get_pubkey(cert.get()));
439 if (!scoped_key) 435 if (!scoped_key)
440 return false; 436 return false;
441 if (!X509_verify(cert.get(), scoped_key.get())) 437 if (!X509_verify(cert.get(), scoped_key.get()))
442 return false; 438 return false;
443 return X509_check_issued(cert.get(), cert.get()) == X509_V_OK; 439 return X509_check_issued(cert.get(), cert.get()) == X509_V_OK;
444 } 440 }
445 441
446 } // namespace net 442 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/x509_certificate.h ('k') | net/cert/x509_certificate_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698