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

Side by Side 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: Dead code 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NET_CERT_SHA256_LEGACY_SUPPORT_WIN_H_
6 #define NET_CERT_SHA256_LEGACY_SUPPORT_WIN_H_
7
8 #include <windows.h>
9 #include <wincrypt.h>
10
11 #include "net/base/net_export.h"
12
13 namespace net {
14
15 namespace sha256_interception {
16
17 typedef BOOL (WINAPI* CryptVerifyCertificateSignatureExFunc)(
18 HCRYPTPROV_LEGACY provider,
19 DWORD encoding_type,
20 DWORD subject_type,
21 void* subject_data,
22 DWORD issuer_type,
23 void* issuer_data,
24 DWORD flags,
25 void* extra);
26
27 // Returns true if running on a platform that lacks SHA-256 support, and thus
28 // it is necessary to intercept and redirect CertVerifyCertificateSignatureEx.
29 NET_EXPORT bool IsNeeded();
30
31 // Interception function meant to be called whenever
32 // CryptVerifyCertificateSignatureEx is called. Note that the calling
33 // conventions do not match, as the caller is expected to ensure that their
34 // interposed function handles the calling conventions and provides a pointer
35 // to the original CryptVerifyCertificateSignatureEx (e.g. to handle parameters
36 // and keys that are not supported).
37 NET_EXPORT BOOL CryptVerifyCertificateSignatureExHook(
38 CryptVerifyCertificateSignatureExFunc original_func,
39 HCRYPTPROV_LEGACY provider,
40 DWORD encoding_type,
41 DWORD subject_type,
42 void* subject_data,
43 DWORD issuer_type,
44 void* issuer_data,
45 DWORD flags,
46 void* extra);
47
48 } // namespace sha256_interception
49
50 } // namespace net
51
52 #endif // NET_CERT_SHA256_LEGACY_SUPPORT_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698