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

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

Issue 506813002: Fix overzealous CHECK in custom EC_KEYs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « net/android/keystore_openssl.cc ('k') | 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ssl/openssl_platform_key.h" 5 #include "net/ssl/openssl_platform_key.h"
6 6
7 #include <openssl/err.h> 7 #include <openssl/err.h>
8 #include <openssl/evp.h> 8 #include <openssl/evp.h>
9 #include <openssl/rsa.h> 9 #include <openssl/rsa.h>
10 10
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 }; 100 };
101 101
102 // ExDataDup is called when one of the RSA or EC_KEY objects is 102 // ExDataDup is called when one of the RSA or EC_KEY objects is
103 // duplicated. This is not supported and should never happen. 103 // duplicated. This is not supported and should never happen.
104 int ExDataDup(CRYPTO_EX_DATA* to, 104 int ExDataDup(CRYPTO_EX_DATA* to,
105 const CRYPTO_EX_DATA* from, 105 const CRYPTO_EX_DATA* from,
106 void** from_d, 106 void** from_d,
107 int idx, 107 int idx,
108 long argl, 108 long argl,
109 void* argp) { 109 void* argp) {
110 CHECK(false); 110 CHECK_EQ((void*)NULL, *from_d);
111 return 0; 111 return 0;
112 } 112 }
113 113
114 // ExDataFree is called when one of the RSA or EC_KEY objects is freed. 114 // ExDataFree is called when one of the RSA or EC_KEY objects is freed.
115 void ExDataFree(void* parent, 115 void ExDataFree(void* parent,
116 void* ptr, 116 void* ptr,
117 CRYPTO_EX_DATA* ex_data, 117 CRYPTO_EX_DATA* ex_data,
118 int idx, 118 int idx,
119 long argl, void* argp) { 119 long argl, void* argp) {
120 KeyExData* data = reinterpret_cast<KeyExData*>(ptr); 120 KeyExData* data = reinterpret_cast<KeyExData*>(ptr);
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 base::ScopedCFTypeRef<SecKeyRef> private_key( 454 base::ScopedCFTypeRef<SecKeyRef> private_key(
455 FetchSecKeyRefForCertificate(certificate)); 455 FetchSecKeyRefForCertificate(certificate));
456 if (!private_key) 456 if (!private_key)
457 return crypto::ScopedEVP_PKEY(); 457 return crypto::ScopedEVP_PKEY();
458 458
459 // Create an EVP_PKEY wrapper. 459 // Create an EVP_PKEY wrapper.
460 return CreatePkeyWrapper(private_key.get()); 460 return CreatePkeyWrapper(private_key.get());
461 } 461 }
462 462
463 } // namespace net 463 } // namespace net
OLDNEW
« no previous file with comments | « net/android/keystore_openssl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698