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_SSL_PRIVATE_KEY_TEST_UTIL_H_ 6 #define NET_SSL_SSL_PRIVATE_KEY_TEST_UTIL_H_ 7 8 #include <string> 9 10 namespace net { 11 12 class SSLPrivateKey; 13 14 // Tests that |key| matches the private key serialized in |pkcs8|. It checks the 15 // reported type and key size are correct, and then it tests all advertised 16 // signature algorithms align with |pkcs8|. It does not test unadvertised 17 // algorithms, so the caller must check this list is as expected. 18 void TestSSLPrivateKeyMatches(SSLPrivateKey* key, const std::string& pkcs8); 19 20 } // namespace net 21 22 #endif // NET_SSL_SSL_PRIVATE_KEY_TEST_UTIL_H_ 23