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

Side by Side Diff: net/ssl/ssl_platform_key_win.h

Issue 2865883002: Unit-test CAPI and CNG SSLPrivateKey implementations. (Closed)
Patch Set: rebase Created 3 years, 7 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/BUILD.gn ('k') | net/ssl/ssl_platform_key_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 2017 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_SSL_SSL_PLATFORM_KEY_WIN_H_
6 #define NET_SSL_SSL_PLATFORM_KEY_WIN_H_
7
8 #include <windows.h>
9
10 // Must be after windows.h.
11 #include <NCrypt.h>
12
13 #include "base/memory/ref_counted.h"
14 #include "crypto/wincrypt_shim.h"
15 #include "net/base/net_export.h"
16
17 namespace net {
18
19 class SSLPrivateKey;
20 class X509Certificate;
21
22 // Returns an SSLPrivateKey backed by |prov| and |key_spec|, which must
23 // correspond to |certificate|'s public key. Takes ownership of |prov|.
24 NET_EXPORT_PRIVATE scoped_refptr<SSLPrivateKey> WrapCAPIPrivateKey(
25 const X509Certificate* certificate,
26 HCRYPTPROV prov,
27 DWORD key_spec);
28
29 // Returns an SSLPrivateKey backed by |key|, which must correspond to
30 // |certificate|'s public key, or nullptr on error. Takes ownership of |key| in
31 // both cases.
32 NET_EXPORT_PRIVATE scoped_refptr<SSLPrivateKey> WrapCNGPrivateKey(
33 const X509Certificate* certificate,
34 NCRYPT_KEY_HANDLE key);
35
36 } // namespace net
37
38 #endif // NET_SSL_SSL_PLATFORM_KEY_WIN_H_
OLDNEW
« no previous file with comments | « net/BUILD.gn ('k') | net/ssl/ssl_platform_key_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698