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

Unified Diff: net/cert/sha256_legacy_support_win.h

Issue 561613002: Support SHA-256 on pre-Vista Windows clients (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Attempt to reset net_test_suite 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/browser_main_runner.cc ('k') | net/cert/sha256_legacy_support_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/sha256_legacy_support_win.h
diff --git a/net/cert/sha256_legacy_support_win.h b/net/cert/sha256_legacy_support_win.h
new file mode 100644
index 0000000000000000000000000000000000000000..c98414ca94b882d5b060a91fe6c6795a9b327c09
--- /dev/null
+++ b/net/cert/sha256_legacy_support_win.h
@@ -0,0 +1,48 @@
+// Copyright 2014 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_CERT_SHA256_LEGACY_SUPPORT_WIN_H_
+#define NET_CERT_SHA256_LEGACY_SUPPORT_WIN_H_
+
+#include <windows.h>
+#include <wincrypt.h>
+
+#include "net/base/net_export.h"
+
+namespace net {
+
+namespace sha256_interception {
+
+typedef BOOL (WINAPI* CryptVerifyCertificateSignatureExFunc)(
+ HCRYPTPROV_LEGACY provider,
+ DWORD encoding_type,
+ DWORD subject_type,
+ void* subject_data,
+ DWORD issuer_type,
+ void* issuer_data,
+ DWORD flags,
+ void* extra);
+
+// Interception function meant to be called whenever
+// CryptVerifyCertificateSignatureEx is called. Note that the calling
+// conventions do not match, as the caller is expected to ensure that their
+// interposed function handles the calling conventions and provides a pointer
+// to the original CryptVerifyCertificateSignatureEx (e.g. to handle parameters
+// and keys that are not supported).
+NET_EXPORT BOOL CryptVerifyCertificateSignatureExHook(
+ CryptVerifyCertificateSignatureExFunc original_func,
+ HCRYPTPROV_LEGACY provider,
+ DWORD encoding_type,
+ DWORD subject_type,
+ void* subject_data,
+ DWORD issuer_type,
+ void* issuer_data,
+ DWORD flags,
+ void* extra);
+
+} // namespace sha256_interception
+
+} // namespace net
+
+#endif // NET_CERT_SHA256_LEGACY_SUPPORT_WIN_H_
« no previous file with comments | « content/browser/browser_main_runner.cc ('k') | net/cert/sha256_legacy_support_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698