ssl_platform_key_nss.h 1.0 KB

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