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