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

Side by Side Diff: net/cert/sha256_legacy_support_win.h

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 | « net/cert/sha256_legacy_support_openssl_win.cc ('k') | net/cert/sha256_legacy_support_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
10 #include "base/strings/string_piece.h"
11 #include "crypto/wincrypt_shim.h"
12 #include "net/base/net_export.h"
13
14 namespace net {
15
16 namespace sha256_interception {
17
18 typedef BOOL (WINAPI* CryptVerifyCertificateSignatureExFunc)(
19 HCRYPTPROV_LEGACY provider,
20 DWORD encoding_type,
21 DWORD subject_type,
22 void* subject_data,
23 DWORD issuer_type,
24 void* issuer_data,
25 DWORD flags,
26 void* extra);
27
28 // Interception function meant to be called whenever
29 // CryptVerifyCertificateSignatureEx is called. Note that the calling
30 // conventions do not match, as the caller is expected to ensure that their
31 // interposed function handles the calling conventions and provides a pointer
32 // to the original CryptVerifyCertificateSignatureEx (e.g. to handle parameters
33 // and keys that are not supported).
34 NET_EXPORT BOOL CryptVerifyCertificateSignatureExHook(
35 CryptVerifyCertificateSignatureExFunc original_func,
36 HCRYPTPROV_LEGACY provider,
37 DWORD encoding_type,
38 DWORD subject_type,
39 void* subject_data,
40 DWORD issuer_type,
41 void* issuer_data,
42 DWORD flags,
43 void* extra);
44
45 // Returns true if |subject_type| a supported subject type for interception.
46 bool IsSupportedSubjectType(DWORD subject_type);
47
48 // Returns true if |issuer_type| is a supported issuer type for interception.
49 bool IsSupportedIssuerType(DWORD issuer_type);
50
51 // Returns the encoded form of |subject_data| or an empty StringPiece if not
52 // supported.
53 base::StringPiece GetSubjectSignature(DWORD subject_type,
54 void* subject_data);
55
56 // Returns the public key of |issuer_data| or NULL if not supported.
57 PCERT_PUBLIC_KEY_INFO GetIssuerPublicKey(DWORD issuer_type,
58 void* issuer_data);
59
60 } // namespace sha256_interception
61
62 } // namespace net
63
64 #endif // NET_CERT_SHA256_LEGACY_SUPPORT_WIN_H_
OLDNEW
« no previous file with comments | « net/cert/sha256_legacy_support_openssl_win.cc ('k') | net/cert/sha256_legacy_support_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698