test_ssl_private_key.h 831 B

1234567891011121314151617181920212223242526272829
  1. // Copyright 2016 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_TEST_SSL_PRIVATE_KEY_H_
  5. #define NET_SSL_TEST_SSL_PRIVATE_KEY_H_
  6. #include "base/memory/ref_counted.h"
  7. #include "third_party/boringssl/src/include/openssl/base.h"
  8. namespace crypto {
  9. class RSAPrivateKey;
  10. }
  11. namespace net {
  12. class SSLPrivateKey;
  13. // Returns a new SSLPrivateKey which uses |key| for signing operations or
  14. // nullptr on error.
  15. scoped_refptr<SSLPrivateKey> WrapOpenSSLPrivateKey(
  16. bssl::UniquePtr<EVP_PKEY> key);
  17. scoped_refptr<SSLPrivateKey> WrapRSAPrivateKey(
  18. crypto::RSAPrivateKey* rsa_private_key);
  19. scoped_refptr<SSLPrivateKey> CreateFailSigningSSLPrivateKey();
  20. } // namespace net
  21. #endif // NET_SSL_TEST_SSL_PRIVATE_KEY_H_