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

Side by Side Diff: net/ssl/ssl_platform_key_chromecast.cc

Issue 2566273008: Use SecKeyCreateSignature on macOS 10.12 and later. (Closed)
Patch Set: rsleevi comments Created 4 years 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/ssl/ssl_platform_key_android_unittest.cc ('k') | net/ssl/ssl_platform_key_mac.h » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 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 <keyhi.h> 5 #include <keyhi.h>
6 #include <pk11pub.h> 6 #include <pk11pub.h>
7 #include <prerror.h> 7 #include <prerror.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 private: 113 private:
114 crypto::ScopedSECKEYPrivateKey key_; 114 crypto::ScopedSECKEYPrivateKey key_;
115 115
116 DISALLOW_COPY_AND_ASSIGN(SSLPlatformKeyChromecast); 116 DISALLOW_COPY_AND_ASSIGN(SSLPlatformKeyChromecast);
117 }; 117 };
118 118
119 } // namespace 119 } // namespace
120 120
121 scoped_refptr<SSLPrivateKey> FetchClientCertPrivateKey( 121 scoped_refptr<SSLPrivateKey> FetchClientCertPrivateKey(
122 X509Certificate* certificate) { 122 const X509Certificate* certificate) {
123 crypto::ScopedSECKEYPrivateKey key( 123 crypto::ScopedSECKEYPrivateKey key(
124 PK11_FindKeyByAnyCert(certificate->os_cert_handle(), nullptr)); 124 PK11_FindKeyByAnyCert(certificate->os_cert_handle(), nullptr));
125 if (!key) { 125 if (!key) {
126 return ClientKeyStore::GetInstance()->FetchClientCertPrivateKey( 126 return ClientKeyStore::GetInstance()->FetchClientCertPrivateKey(
127 *certificate); 127 *certificate);
128 } 128 }
129 129
130 return make_scoped_refptr(new ThreadedSSLPrivateKey( 130 return make_scoped_refptr(new ThreadedSSLPrivateKey(
131 base::MakeUnique<SSLPlatformKeyChromecast>(std::move(key)), 131 base::MakeUnique<SSLPlatformKeyChromecast>(std::move(key)),
132 GetSSLPlatformKeyTaskRunner())); 132 GetSSLPlatformKeyTaskRunner()));
133 } 133 }
134 134
135 } // namespace net 135 } // namespace net
OLDNEW
« no previous file with comments | « net/ssl/ssl_platform_key_android_unittest.cc ('k') | net/ssl/ssl_platform_key_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698