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

Side by Side Diff: chrome/browser/ssl/ssl_client_auth_handler_win.cc

Issue 2867026: Make X509Certificate::CreateFromHandle() copy the OSCertHandle, rather than assume ownership (Closed)
Patch Set: Deleted one comment too many Created 10 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 | « no previous file | net/base/cert_test_util.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/ssl/ssl_client_auth_handler.h" 5 #include "chrome/browser/ssl/ssl_client_auth_handler.h"
6 6
7 #include <cryptuiapi.h> 7 #include <cryptuiapi.h>
8 #pragma comment(lib, "cryptui.lib") 8 #pragma comment(lib, "cryptui.lib")
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 30 matching lines...) Expand all
41 IDS_CLIENT_CERT_DIALOG_TEXT, 41 IDS_CLIENT_CERT_DIALOG_TEXT,
42 ASCIIToWide(cert_request_info_->host_and_port)); 42 ASCIIToWide(cert_request_info_->host_and_port));
43 PCCERT_CONTEXT cert_context = CryptUIDlgSelectCertificateFromStore( 43 PCCERT_CONTEXT cert_context = CryptUIDlgSelectCertificateFromStore(
44 client_certs, browser_hwnd, title.c_str(), text.c_str(), 0, 0, NULL); 44 client_certs, browser_hwnd, title.c_str(), text.c_str(), 0, 0, NULL);
45 45
46 if (cert_context) { 46 if (cert_context) {
47 cert = net::X509Certificate::CreateFromHandle( 47 cert = net::X509Certificate::CreateFromHandle(
48 cert_context, 48 cert_context,
49 net::X509Certificate::SOURCE_LONE_CERT_IMPORT, 49 net::X509Certificate::SOURCE_LONE_CERT_IMPORT,
50 net::X509Certificate::OSCertHandles()); 50 net::X509Certificate::OSCertHandles());
51 net::X509Certificate::FreeOSCertHandle(cert_context);
51 } 52 }
52 53
53 ok = CertCloseStore(client_certs, CERT_CLOSE_STORE_CHECK_FLAG); 54 ok = CertCloseStore(client_certs, CERT_CLOSE_STORE_CHECK_FLAG);
54 DCHECK(ok); 55 DCHECK(ok);
55 56
56 CertificateSelected(cert); 57 CertificateSelected(cert);
57 } 58 }
OLDNEW
« no previous file with comments | « no previous file | net/base/cert_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698