• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2015 The Chromium Authors
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_NSS_H_
6 #define NET_SSL_SSL_PLATFORM_KEY_NSS_H_
7 
8 #include "base/memory/scoped_refptr.h"
9 #include "net/base/net_export.h"
10 
11 typedef struct CERTCertificateStr CERTCertificate;
12 
13 namespace crypto {
14 class CryptoModuleBlockingPasswordDelegate;
15 }
16 
17 namespace net {
18 
19 class SSLPrivateKey;
20 class X509Certificate;
21 
22 // Returns an SSLPrivateKey backed by the NSS private key that corresponds to
23 // |certificate|'s public key. If |password_delegate| is non-null, it will be
24 // used to prompt for a password if necessary to unlock a slot or perform
25 // signing operations.
26 NET_EXPORT scoped_refptr<SSLPrivateKey> FetchClientCertPrivateKey(
27     const X509Certificate* certificate,
28     CERTCertificate* cert_certificate,
29     scoped_refptr<crypto::CryptoModuleBlockingPasswordDelegate>
30         password_delegate);
31 
32 }  // namespace net
33 
34 #endif  // NET_SSL_SSL_PLATFORM_KEY_NSS_H_
35