summaryrefslogtreecommitdiffstats
path: root/net/base/scoped_cert_chain_context.h
diff options
context:
space:
mode:
authorrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-01 01:57:52 +0000
committerrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-01 01:57:52 +0000
commit6fc7bdccd425f2298b0ffa8d3a548b619d7cb9a6 (patch)
tree3b7683adac39b8318e0837cf995f98040e79c5ac /net/base/scoped_cert_chain_context.h
parent27cc73365fd33c212faaf346e42c276daa3b494b (diff)
downloadchromium_src-6fc7bdccd425f2298b0ffa8d3a548b619d7cb9a6.zip
chromium_src-6fc7bdccd425f2298b0ffa8d3a548b619d7cb9a6.tar.gz
chromium_src-6fc7bdccd425f2298b0ffa8d3a548b619d7cb9a6.tar.bz2
Ensure X509Certificate::OSCertHandles are safe to be used on both UI, IO, and Worker threads on Win.
Mirror the behaviour of SChannel by creating a new in-memory HCERTSTORE containing the certificate and its intermediate CA certificates whenever it is necessary to pass in a PCCERT_CONTEXT to a Windows API that may need to access the PCCERT_CONTEXT->hCertStore - such as certificate chain verification or display. This also paves the way for removing the GlobalCertStore on Windows, which was necessary in order to link certificates with their intermediates for these same APIs. BUG=47648 TEST=net_unittests:X509CertificateTest.* should cover this. Additionally, on a fresh profile, navigate to different HTTPS sites. From the Page Info Bubble, select Certificate Information, and in the Windows Certificate Viewer, click "Certification Path" and confirm the entire certificate chain is displayed. This is a variation of testing for http://crbug.com/45706, which should not regress. Review URL: http://codereview.chromium.org/7324039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108056 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/scoped_cert_chain_context.h')
-rw-r--r--net/base/scoped_cert_chain_context.h30
1 files changed, 0 insertions, 30 deletions
diff --git a/net/base/scoped_cert_chain_context.h b/net/base/scoped_cert_chain_context.h
deleted file mode 100644
index 668e46e..0000000
--- a/net/base/scoped_cert_chain_context.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef NET_BASE_SCOPED_CERT_CHAIN_CONTEXT_H_
-#define NET_BASE_SCOPED_CERT_CHAIN_CONTEXT_H_
-#pragma once
-
-#include <windows.h>
-#include <wincrypt.h>
-
-#include "base/memory/scoped_ptr.h"
-
-namespace net {
-
-// This class wraps the CertFreeCertificateChain function in a class that can
-// be passed as a template argument to scoped_ptr_malloc.
-class ScopedPtrMallocFreeCertChain {
- public:
- void operator()(const CERT_CHAIN_CONTEXT* x) const {
- CertFreeCertificateChain(x);
- }
-};
-
-typedef scoped_ptr_malloc<const CERT_CHAIN_CONTEXT,
- ScopedPtrMallocFreeCertChain> ScopedCertChainContext;
-
-} // namespace net
-
-#endif // NET_BASE_SCOPED_CERT_CHAIN_CONTEXT_H_